Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343131 - [region] mBeans are still registered after framework stop
Summary: [region] mBeans are still registered after framework stop
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.components-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 343391 344660
  Show dependency tree
 
Reported: 2011-04-18 06:35 EDT by Hristo Iliev CLA
Modified: 2011-05-12 05:13 EDT (History)
3 users (show)

See Also:


Attachments
patch (6.52 KB, patch)
2011-04-18 17:03 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.