[jboss-user] [JBossCache] - Re: Problem with ShutdownHook
bstansberry@jboss.com
do-not-reply at jboss.com
Tue Dec 11 12:24:57 EST 2007
Another issue with the shutdown hook I'm seeing with Hibernate testing is that the hook doesn't get removed in internalStop(). JBC should keep a ref to the hook and remove it in internal stop; otherwise:
1) The hook executes at vm shutdown even though the cache was previously stopped/destroyed. That currently just causes a DEBUG log, but it's prone to breakage.
2) Until that happens you've leaked a ref to the CacheImpl to the shutdown hook thread.
Might want to make the hook impl a bit more sophisticated so internalStop() can check if it is executing -- i.e. don't call Runtime.removeShutdownHook if it is the hook itself that calls internalStop().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112021#4112021
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112021
More information about the jboss-user
mailing list