Your question seems a little confusing to me, because a context is the
same thing as a webapp in my opinion.
If I have multiple contexts, I consider them multiple webapps.
Are you saying that your webapp is whatever it is that you put on the
tomcat server that didn't come with it? Those are actually considered
multiple webapps.
You can start and stop contexts without affecting other contexts, but
I've never trusted the manager app to completely handle this correctly
in tomcat 4. As far as restarting gracefully, I believe you could add
code to the ContextListener that checks to see that there are no
sessions, but that would mean that you would need to have session
listeners as well and a static variable in your ContextListener class
that was incremented or decremented as sessions were created or
destroyed. Then your ContextListener could refuse to shut down until
there were no sessions left. However, that isn't the same thing that you
are looking for I believe. You would also have to make a way for new
sessions to be denied until the old ones all died. That could take
hours, and I don't think you would want your app down that long just to
let the people who are there finish what they are doing, while
sacrificing the new people from creating sessions.
Daniel Gibby
P.S. I wouldn't put Quick in your subject line. Nothing is a quick
question on this list, unless it is a yes or a no. And that never gives
enough detail.
Rick Szeto wrote:
> Hi,
> Does Tomcat 5 allow starting, stopping and/or restarting of a context
> without affecting the other contexts of the same webapp? Also, can a
> context be stopped or restarted gracefully(ie keep running until all
> of the sessions are dead)?
>
> Thanks,
> Rick Szeto
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)