On Sun, May 4, 2008 at 1:09 PM, <[EMAIL PROTECTED]> wrote: > > David Smith wrote: > >> But to use the api that the manager app uses, your webapp needs to have > >> privileged="true" set in the context first. Second, look at the source > >> for the manager webapp for exactly what it does. And lastly, notice > the > >> manager webapp can't reload itself -- I suspect there's a reason for > >> that. > >> I'm not sure a webapp being reloaded can request the manager reload it > >> as the manager does it during the request and doesn't send a response > >> until the reload is complete. If you have code that can't unload > >> because it's actively being executed, it might block the reload. > > > > If you have autoDeploy set to true on the host, one quick and dirty hack > > around this would be to touch the web.xml file. It has the advantage of > > de-coupling the reload of the webapp from the request you use to trigger > > it. On the down side, it requires you to be using unpacked web apps and > > the > > reload won't be instant. > > > > Mark > > Thanks Mark, > I also came to this idea but I wanted to check if there is a cleaner way > (using some API) to do this. Concerning my specific web app, there is no > problem related to packing/unpacking and even the delay between touching > web.xml and reloading is not important (if that happens at least after few > minutes). >
The API is JMX - you need to get the mbean server ( findMBeanServer() ), then invoke 'reload' on your webapp. The object name as specified by JSR77 ( I think) looks like: default:j2eeType=WebModule,name=//localhost/examples,J2EEApplication=none,J2EEServer=none Costin > Milos > > > > > --------------------------------------------------------------------- > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >