[jboss-dev-forums] [Design of JBossCache] - JBCACHE-1025: JBossCache mbean registration fails on WebSphe

JerryGauth do-not-reply at jboss.com
Tue Apr 17 13:16:01 EDT 2007


Here's more information on this issue -

At least two JBossCache customers have reported that JBC fails when the cache is started on WebSphere 6.1 due to an exception indicating that an attempt has been made to register an already registered mbean.  This occurs on initial startup so it's not necessary to stop and restart the cache to trigger the problem.

I've googled and found that similar WebSphere mbean registration problems have also been reported in forums for Spring and ActiveMQ.  According to the ActiveMQ posting, the problem occurs because WebSphere modifies the registration name during the registration process (i.e., it appends some WebSphere goo).  So code that only proceeds if an object isn't registered may fail since the registration is under a different name.  Deregistration might also be affected but I'm not sure yet.

I haven't confirmed the reported cause yet but I'm going to debug this issue on a WebSphere environment this afternoon.  Assuming it's as reported, the most logical fix would be to retrieve the actual registration name during the registration process and then use this subsequently.  This would require adding  an instance variable to TreeCache to store the name as well as a getter/setter so that MBeanConfigurator can access the information.  Alternative options would include modifying the registration method signature to pass the name or perhaps caching the information in MBeanConfigurator (ugh).

The ActiveMQ posting suggests another alternative would be to use queryNames() instead of isRegistered() to determine whether an object is registered.

I suppose the best alternative would be for WebSphere to modify their behavior.  :)

I'm planning to fix this initially for my employer as we're going to ship JBC 1.4.1 SPx with our next release for use on WebSphere.   I can then apply whatever fix is appropriate to the JBC 1.4 code base.  I know that the 2.0 code base is different so I'm not sure what would be appropriate there right now.

I'll advise if my debugging turns up anything different but this is my current understanding of the problem and potential solutions.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038059#4038059

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038059



More information about the jboss-dev-forums mailing list