Caldarale, Charles R wrote:
From: André Warnier [mailto:a...@ice-sa.com]
Subject: Re: Tomcat for Dummies
If I am not abusing, how does it do that, schematically ?
I presume it has a more direct way than to itself isue a
HTTP request to the Manager webapp with the appropriate
parameters ?
No, the HTTP request would be the simplest approach. There's likely a JMX call
that could be done, but it would be more work. Certainly there are internal
APIs that could be used, but those are subject to change at any time, and are
normally not available to regular webapps.
And if it asks to undeploy itself, is it not like pulling
the carpet from under its own feet ? I mean, this webapp
is running, and even after asking the Manager to undeploy
itself (meaning its whole shebang of classes and libs will
be erased from the disk), it should be able to still stop
itself cleanly.
That should be handled by a ServletContextListener declared in WEB-INF/web.xml,
which will be invoked before the deletion of the webapp's files.
More seriously thus, there seems to be a problem with this logic :
Suppose we have a case where 5 instances of this webapp are currently
running, and one of them issues a request to the Manager, to undeploy
itself. The Manager would then oblige, and start undeploying the
webapp. The ServletContextListener in each of the running webapp
instances would be called, before the Manager does anything drastic.
Presumably then each ServletContextListener instance would have to take
some action to force the corresponding webapp instance to stop and
cleanup its act, and also presumably the Manager would wait for each of
these instances to return some form of OK, before it proceeds with
erasing the webapps files.
But is that really what happens ?
I feel somewhat uncomfortable with the above scheme, more out of a gut
feeling than anything else. Am I wrong ?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org