File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Hot Deploying Class Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Hot Deploying Class Files" Watch "Hot Deploying Class Files" New topic
Author

Hot Deploying Class Files

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Long story short, I've got a handful of class files that I need to deploy into a running webapp in Tomcat 6. I've copied them to the right location and made sure the permissions were right. I've deleted everything in the work directory and I've bounced tomcat. I'm still getting results from the old class files. What am I missing?


GenRocket - Experts at Building Test Data
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1836
    
    7

Does the Context have it's reloadable property set?
Also, and I've gone absolutely batcrap crazy trying to figure this out myself once, the risk of deploying individual class files is that they might contain public static final members that have changed, which you might expect would be picked up. Except if you don't recompile a class that uses the changed 'constant' of another class, it will still use the old value, because they're copied into the .class file's constant pool during compilation.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Jelle Klap wrote:Does the Context have it's reloadable property set?
Also, and I've gone absolutely batcrap crazy trying to figure this out myself once, the risk of deploying individual class files is that they might contain public static final members that have changed, which you might expect would be picked up. Except if you don't recompile a class that uses the changed 'constant' of another class, it will still use the old value, because they're copied into the .class file's constant pool during compilation.


No, reload-able isn't set (which should mean false). I'm thinking it might be a spring thing. This is a service class that is loaded (singleton) by spring. But I thought kicking tomcat would take care of it. Not sure why / how that context would be being held onto.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hot Deploying Class Files