This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Hot Deploying Class Files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Hot Deploying Class Files" Watch "Hot Deploying Class Files" New topic
Author

Hot Deploying Class Files

Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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?
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1430

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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Hot Deploying Class Files
 
Similar Threads
'cleaning tomcat'
what wrong ? :-(
tagdir question
Error while trying to run Tomcat for servlets
JSP's and class files.....