You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by st...@illinoispower.com on 2002/02/26 00:01:16 UTC

Tomcat 4.0.2 and Poolman 2.1 beta stops shutdown

As has been discussed before, now that the System.exit calls are out of
4.0.2, some packages can stop proper Tomcat shutdowns from happening.
Poolman (JDBC datasource pools and generic object pools)   from
codestudio.com is one of these packages.  For anyone that is interested, I
have made relatively minor changes to Poolman 2.1 beta source that support
a clean way of shutting poolman down under Tomcat 4.0.2 and allowing a
proper shutdown to occur.  Vanilla Poolman relies on JVM shutdown hooks to
do resource cleanups, and of course these hooks no longer happen in Tomcat
4.0.2 now that the System.exit calls are gone.  So some Threads are left
running forever that used to be killed by the System.exit call.   The new
source makes a new PoolMan.stop() method available that causes all pools to
close, the Lifeguard and Skimmer theads to end, and any JMX servers to
close.  This can be invoked in the destroy() method of any appropriate
servlet.  If anyone is interested in the changes, contact me by email.

BTW - I have sent emails to the poolman@codestudio.com address, but have
heard no replies, so I don't know whether it's ok (or if there's a way) to
make these changes part of the official poolman 2.1 beta codebase. If
anyone can point me at where better to pursue that, I'd appreciate the
info.  Poolman is a good pool manager and I'd love to see it work better
long-term with Tomcat 4.0.2 and later...


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.2 and Poolman 2.1 beta stops shutdown

Posted by Remy Maucherat <re...@apache.org>.
> As has been discussed before, now that the System.exit calls are out of
> 4.0.2, some packages can stop proper Tomcat shutdowns from happening.
> Poolman (JDBC datasource pools and generic object pools)   from
> codestudio.com is one of these packages.  For anyone that is interested, I
> have made relatively minor changes to Poolman 2.1 beta source that support
> a clean way of shutting poolman down under Tomcat 4.0.2 and allowing a
> proper shutdown to occur.  Vanilla Poolman relies on JVM shutdown hooks to
> do resource cleanups, and of course these hooks no longer happen in Tomcat
> 4.0.2 now that the System.exit calls are gone.  So some Threads are left
> running forever that used to be killed by the System.exit call.   The new
> source makes a new PoolMan.stop() method available that causes all pools
to
> close, the Lifeguard and Skimmer theads to end, and any JMX servers to
> close.  This can be invoked in the destroy() method of any appropriate
> servlet.  If anyone is interested in the changes, contact me by email.

Yes, I'd say that's the cleaest way to do it. Or write a lifecycle listener
and associate it with the server (this looks even cleaner).

Remy


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>