Hi Thanks for the tip. While I am very grateful for your advice, I am not sure I like either of the approaches. I was hoping just to call a Tomcat API function directly from my web application. Is'nt there a method called restart() or something? JMX seems like overkill since I do not need to control the application remotely. The application doing the calling is the application that needs to be restarted itself. Any further ideas?
Thanks Jamie Pid-2 wrote: > > jamieb wrote: >> Hi there >> >> I am busy implementing an auto update facility for a Tomcat web >> application. >> As part of the auto update process, the auto update code needs to unpack >> the >> changed class files and reload the Tomcat web application. >> >> I am aware that you can configure Tomcat to automatically reload the web >> application when class files are changed. I've decided against the use of >> this functionality for fear of unscheduled service disruption. >> >> My question: Is recommended way for a web application to apply an update >> to >> itself and restart itself? Is there an API call to reload the current >> Tomcat >> web application from within that application? > > If app auto-reload facilities are switched off, you should be able to > replace WAR files safely*, and then use the built in JMX stuff to > restart the webapp in question. > > (* If you're doing it from a remote location, be sure to send it to a > safe directory /then/ do an internal copy to replace the file, rather > than directly uploading to the target web app dir. Failed or slow > uploads won't cause problems then.) > > > > You can also use the included Tomcat Ant tasks, I think, (see > bin/catalina-tasks.xml) > > See also: > > http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html > http://tomcat.apache.org/tomcat-6.0-doc/mbeans-descriptor-howto.html > > The Tomcat manager app uses JMX AFAIK, so you could examine the source > code if you wanted to customise your own utility. > > > p > > > > >> Much appreciate >> >> Jamie >> >> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/API-call-to-reload-Tomcat-web-application-tp16065357p16092888.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]