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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...