Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343131

Summary: [region] mBeans are still registered after framework stop
Product: [Eclipse Project] Equinox Reporter: Hristo Iliev <hsiliev>
Component: ComponentsAssignee: equinox.components-inbox <equinox.components-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington, hsiliev, tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 343391, 344660    
Attachments:
Description Flags
patch none

Description Hristo Iliev CLA 2011-04-18 06:35:18 EDT
Some Virgo mBeans are left registered after framework stop finished:

[org.eclipse.virgo.kernel.osgi.region.management.internal.StandardManageableRegion[org.eclipse.virgo.kernel:type=Region,name=org.eclipse.virgo.region.kernel], 

org.eclipse.virgo.kernel.osgi.region.management.internal.StandardManageableRegionDigraph[org.eclipse.virgo.kernel:type=RegionDigraph], 

org.eclipse.virgo.kernel.osgi.region.management.internal.StandardManageableRegion[org.eclipse.virgo.kernel:type=Region,name=org.eclipse.virgo.region.user], 

org.eclipse.virgo.kernel.osgi.region.management.internal.StandardManageableRegion[org.eclipse.virgo.kernel:type=Region,name=org.eclipse.virgo.region.user.coregion]]
Comment 1 Glyn Normington CLA 2011-04-18 06:43:49 EDT
The coregion mbean is an example of an mbean that was not destroyed when its region was deleted.

The others should have been destroyed on framework termination.

Re-assigning to fix in Equinox.
Comment 2 Thomas Watson CLA 2011-04-18 17:03:04 EDT
Created attachment 193532 [details]
patch

Would be good to have some tests that check the MBeanServer for the proper presence of the region MBeans.
Comment 3 Thomas Watson CLA 2011-04-18 17:06:37 EDT
I released the patch, leaving open to add testcases for the MBeans.
Comment 4 Thomas Watson CLA 2011-04-19 16:36:37 EDT
I released some tests for the mbean stuff.  Would be good if someone else with more JMX experience than I looked at the testcase.  I have almost no experience with JMX and had to stumble over the javax.management javadoc for a while to write the current test:

org.eclipse.equinox.region.tests.system.RegionSystemTests.testMbeans()

Resolving as fixed.
Comment 5 Glyn Normington CLA 2011-04-20 03:58:19 EDT
testMbeans looks fine to me.
Comment 6 Glyn Normington CLA 2011-04-20 04:01:54 EDT
Hristo - after we have completed the move of Virgo's region support to Equinox, this bug fix should solve the problem you were seeing, provided the Equinox "regions" bundle is stopped by the time your checks for left-over mbeans happen.
Comment 7 Hristo Iliev CLA 2011-05-11 13:06:41 EDT
Bug 343391 will provide the means to test if all mBeans are removed. If this is so I'm going to close this bug.
Comment 8 Hristo Iliev CLA 2011-05-12 05:13:38 EDT
mBeans are not registered anymore. Closing the bug.