[Proxool-developer] Re: [Proxool-user] warning messages
UNMAINTAINED!
Brought to you by:
billhorsman
|
From: Michael H. <mh...@ni...> - 2004-04-22 19:30:03
|
Hi there...I'm getting the same errors, and they seem to be correct.
Using 0.8.3. Now as far as I've read, you are now allowed to remove
shutdown hooks after a shutdown has been initiated. Yet this is exactly
what proxool is trying to do. Looks like a bug to me. ProxoolFacade
should be refactored to not remove any shutdown hooks when called from
the shutdown hook itself. I'm surprised nobody else has seen this...am
I missing something?
=0D
/**
* Remove all connection pools without delay
* @see ProxoolFacade#removeAllConnectionPools
*/
public void run() {
LOG.debug("Running ShutdownHook");
Thread.currentThread().setName("Shutdown Hook");
ProxoolFacade.shutdown(0);
}
=0D
WHICH CALLS...
=0D
/**
* Removes all connection pools. Kills all the connections. Resets
everything.
* @param finalizer used to identify who is causing the pools to be
removed (helps logging)
* @param delay the time to wait for connections to become inactive
before killing it (milliseconds)
*/
protected static void shutdown(String finalizer, int delay) {
=0D
ConnectionPool[] cps =3D
ConnectionPoolManager.getInstance().getConnectionPools();
for (int i =3D 0; i < cps.length; i++) {
removeConnectionPool(finalizer, cps[i], delay);
}
=0D
// If a shutdown hook was registered then remove it
try {
if (shutdownHook !=3D null) {
ShutdownHook.remove(shutdownHook);
}
} catch (Throwable t) {
if (LOG.isDebugEnabled()) {
LOG.debug("Unanticipated error during removal of
ShutdownHook. Ignoring it.", t);
}
}
}
=0D
=0D
--=0D
Michael Hoefer
Architect
Software Engineering
Niku Corporation
305 Main Street
Redwood City, CA 94063
Tel: 650.298.5916
Fax: 650.298.5946
Web: www.niku.com
=0D
CONFIDENTIALITY NOTICE: The information contained in this message and or=
attachments is intended only for the person or entity to which it is=
addressed and may contain confidential and/or privileged material. Any=
review, retransmission, dissemination, copying, or other use of this=
information by persons or entities other than the intended recipient is=
prohibited. If you received this e-mail or its attachments in error,=
please contact the sender and delete the material from any system and=
destroy any copies. |