[ https://issues.apache.org/activemq/browse/SM-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved SM-892. -------------------------------- Resolution: Fixed Fix Version/s: 3.2 3.1.1 Assignee: Guillaume Nodet URL: http://svn.apache.org/viewvc?view=rev&rev=521281 URL: http://svn.apache.org/viewvc?view=rev&rev=521282 > ManagementContext.shutdown() calls wrong method to unregister MBeans > -------------------------------------------------------------------- > > Key: SM-892 > URL: https://issues.apache.org/activemq/browse/SM-892 > Project: ServiceMix > Issue Type: Bug > Components: servicemix-core > Affects Versions: 3.1 > Environment: All > Reporter: David Potter > Assigned To: Guillaume Nodet > Priority: Minor > Fix For: 3.1.1, 3.2 > > Original Estimate: 4 hours > Remaining Estimate: 4 hours > > The problem code is: > Object[] beans = beanMap.keySet().toArray(); > for (int i = 0; i < beans.length; i++) { > try { > unregisterMBean(beans[i]); > } catch (Exception e) { > log.debug("Could not unregister mbean", e); > } > } > The object[] will contain the keys - these is an array of ObjectName but they > are typed as Object > There are two unregisterMBean methods unregisterMBean(Object bean) and > unregisterMBean(ObjectName name). > The code will now call unregisterMBean(Object bean) when we want it to call > unregisterMBean(ObjectName name). this will result in no beans being > unregisters from this method. > The fix is, I think, to cast bean[i] to an ObjectName in the method call. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.