Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i'm running my web app on tomcat 6.0.20. So whenever i edit a java file and compile it, i'm restarting tomcat to reload the class file. I know i can set reloadable = true in server.xml to do this. But. my colleague says we can't trust that option, it's better to restart tomcat. Is he right? should i restart it all the time?? Your suggestions are welcome!

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Setting reloadable = true is much the same as running a Rails app in test/dev mode, or a similar Django app under the web.py test server -- the server monitors your files for changes and reloads them as necessary so you don't have to restart the server. This is a feature that is intended only for development use.

As the above poster mentioned (and this is common of all these test platforms) there is quite a runtime performance price for this behavior -- your class files will be recompiled into bytecode with every minor change; and the overhead of monitoring the $CLASSPATH for changes.

You should, ideally, have two environments, a dev environment where reloadable = true is OK; and a production, code-controlled environment where performance and reliability are of the utmost importance.

share|improve this answer
add comment

You should not use reloadable in production. It has quite a runtime price.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.