I've just discovered a related issue when JBossCache isn't configured as a JBoss
service. This issue applies when running on JBossAS as well as other servers.
Suppose my cache's lifecycle is as follows.
TreeCache cache = new TreeCache();
cache.start();
... // use the cache
cache.stop();
cache.destroy();
The start() method invocation will cause the cache's mbeans to be registered, assuming
registration is enabled.
The destroy() method invocation should deregister the mbeans that were previously
registered. However this isn't occurring when the cache is created as noted. When
running on JBossAS, the following messages are emitted to the log and
cache.destroyService() is never invoked so deregistration never occurs.
10:21:51,053 WARN [ServiceController] Ignoring request to stop nonexistent service:
jboss.cache:service=TreeCache-Group
10:21:51,053 WARN [ServiceController] Ignoring request to destroy nonexistent service:
jboss.cache:service=TreeCache-Group
It appears that the cache client must explicitly invoke cache.stopService() and
cache.destroyService() to ensure that the cache is shut down properly.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038457#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...