[Mc4j-development] [ mc4j-Bugs-914838 ] MBean displayed duplicate
Brought to you by:
ghinkl
From: SourceForge.net <no...@so...> - 2004-05-26 03:00:53
|
Bugs item #914838, was opened at 2004-03-12 04:02 Message generated for change (Settings changed) made by ghinkl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=914838&group_id=60228 Category: MBeans Group: MC4J 1.2b4 >Status: Pending Resolution: None Priority: 7 Submitted By: Christian Schweer (holbitlan) >Assigned to: Greg Hinkle (ghinkl) Summary: MBean displayed duplicate Initial Comment: When I connect to a JSR160 agent with mc4j 1.2b4, some mbean are displayed duplicate. E.g. I deployed one (!) HelloWorld MBean and the bean is shown twice in mc4j. If I disconnect from the agent and reconnect again, the number of displayed mbean is correct! Steps to reproduce: 1. startup JSR160-agent (I'm using mx4j2.0beta1) 2. deploy 2 MBeans at startup 3. start a new (!) mc4j and connect to mx4j Expected result: 2 different beans are shown under my domain Actual result: 3 beans are shown (1 bean is shown twice). Disconnect from mx4j and reconnect without exiting mc4j -> the expected result is reached. Sometimes even my domain is doubled... but I can't reproduce this reliably ---------------------------------------------------------------------- >Comment By: Greg Hinkle (ghinkl) Date: 2004-05-25 22:00 Message: Logged In: YES user_id=773314 The patch has been incorporated. Thanks Christian! ---------------------------------------------------------------------- Comment By: Christian Schweer (holbitlan) Date: 2004-05-14 07:47 Message: Logged In: YES user_id=902230 A classic race condition when the node tree is created: Both threads "Module-Actions" and "Mc4j connection Thread" run into the method ConnectionNode.loadConnectionNodeChildren() Unfortunately the test whether a node is already added and the add itself is NOT synchronized. So some nodes are indeterministic added twice. The provided file adds necessary synchronized blocks and additionally I changed the method browseToNode(ObjectName) to use getMBeanNode() instead of doing the same with own code. Bye, Christian ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=493495&aid=914838&group_id=60228 |