Startup AND shutdown of separate JVM's
I have been using Tomcat for a while now and with good success. I recently setup virtual hosts (named vhosts) and was surprised when it all worked the first time. =) The documentation in the mod_jk-howto was a great help. Here is my setup: I have two different (eventually more) virtual hosts on one machine being served by Tomcat 3.2.1 and Apache 1.3.14. Right now there is only one Tomcat JVM running, but I'm getting ready to break this up into 2 separate JVM's. The configuration part is trivial now that I have virtual hosts working, but there is one part I can't figure out. The two vhost setup is for production and development versions of the same application. So one JVM I will need to restart regularly, and the other needs to stay up as much as possible. There are a couple of problems I forsee that I need to understand and tackle before moving forward. One is that there is only startup/shutdown script for Tomcat. I understand that, by creating different server.xml configuration files and using (e.g.) startup.sh -f server1.xml, I can start separate servers. My question is, how do I stop them separately? If I have to write my own scripts I am willing to go that route, I just want to make sure there's not some preexisting method. Also I read in the FAQ that if you restart Tomcat, you also have to restart Apache. I've tested this out with mixed results. Is this true? If that is the case, running separate JVM's for each website becomes useless to me. No offense to the other benefits of running separate JVM's! If I have my production JVM which needs to stay up, but Apache has to restart every time I restart my development JVM, wouldn't that mean I have to restart my production JVM every time I restart my development JVM? Worst case, I can run my development on the built-in webserver, but it would be nice to use app.domain.com and app-dev.domain.com without having to tack on a :8080. So in review, my questions are: If running separate JVM's connected to a single Apache, how do I restart one JVM while leaving the other running? Also, if running under said setup, does restarting one Tomcat JVM mean that Apache and any other Tomcat JVM's have to be restarted as well? Thanks in advance for any insight. -Scott (p.s. was running JRun 3 before Tomcat. Experienced daily lockups. No lockups with Tomcat and it is noticeably faster. JRun 3 has a nice web-based admin setup though.) -- Scott Tatum | [EMAIL PROTECTED] Senior Applications Developer, Special Projects WorldCom | http://www.wcom.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Startup AND shutdown of separate JVM's
On Thu, 1 Mar 2001, Scott Tatum wrote: [ ... ] So in review, my questions are: If running separate JVM's connected to a single Apache, how do I restart one JVM while leaving the other running? Also, if running under said setup, does restarting one Tomcat JVM mean that Apache and any other Tomcat JVM's have to be restarted as well? Thanks in advance for any insight. As to your first question, check out: http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/uguide/tomcat_ug.html particularly the section "Configuring for Multiple Tomcat JVMs". If I understand correctly what you are trying to do, it seems to talk about just what you're looking for (in particular, the startup.sh script can take an option that specifies the server.xml file). Hmmm, in re-reading the part of your note that I deleted, I see that you're already aware of that, and you're worried about shutdown. Well, that's not explicitly covered in the above document, but perhaps the shutdown.sh script can take that same option. I do note that the tomcat.sh script, which both startup.sh and shutdown.sh call, passes any incoming command line options/arguments to the java class it runs, for both start and stop (and those two scripts pass their command line options/arguments to tomcat.sh). As to your second question, I myself am confused as to when Apache and Tomcat need to be restarted as well (although my questions have more to do with what needs to be done so that changes in certain config files are picked up), and perhaps someone can comment on that. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]