0

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!

Senthil Kumar
  • 113
  • 1
  • 7

2 Answers2

1

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.

Sam Halicke
  • 6,122
  • 1
  • 24
  • 35
0

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

user6373
  • 174
  • 4