|
From: Bill H. <bi...@lo...> - 2003-02-04 17:17:13
|
Hi all,
A further twist: my tests with Tomcat show that the ShutdownHook works
fine when you shutdown Tomcat. But if you simply touch the web.xml this
causes the application to be restarted. The Servlet's destroy() method
is called but not the ShutdownHook (which is as you might expect since
the JVM isn't shutting down).
As a consequence, it might make sense, for some people to use:
public void destroy() {
ProxoolFacade.removeAllConnectionPools(0);
}
as well.
Fortunately, when you do eventually shutdown Tomcat then all the hooks
are run so everything is eventually cleaned up. The only problem is that
you might have more pools running than you think.
> 1- Not all VM implementations apparently support the shutdownHook
> properly. I do not have any solid evidence to this available, but this
> is what I know I've read in places before.
Maybe it is a FAQ. Q. "I have stopped my application but Proxool keeps
running". A. "Shutdown manually."
> 3- Perhaps for versions -1.3 to use this Runtime.runFinalizersOnExit
But it's deprecated because it is unsafe. We *could* do that, or we
could just advise JDK < 1.3 users to finalize manually.
--
Bill Horsman
Proxool
http://proxool.sourceforge.net
ICQ: 119577180
|