[ https://jira.terracotta.org/jira//browse/CDV-260?page=comments#action_20849 ] Nathaniel Harward commented on CDV-260: ---------------------------------------
The forum poster describes the "normal" way to get the MBean server using ManagementFactory.getPlatformMBeanServer(); unfortunately this is 1.5+ and we have to support 1.4 -- the method currently used is 1.4+ compatible. I see our options as twofold: 1) make a parallel code module that is discovered at runtime to use either the old 1.4 way if on 1.4 and the "normal" way if on 1.5 or 2) look at the JDK source and see what ManagementFactory.getPlatformMBeanServer() does under the covers, and see if we can't re-work our code to operate nicely within that framework while still being 1.4 compatible (this is preferred IMHO, I don't like the annoyance of parallel 1.4/1.5 modules). I'm still not exactly sure why this is a problem: it seems to me that if we are doing the same thing as Tomcat (though there is a potential race condition there) then whoever got there first would win, and the second-in would just use the MBean server that the other created. My guess is that the "platform" MBeanServer must somehow be created differently, or this race condition is just hitting and two MBean servers are getting created by us first and then Tomcat. I think we should look at the ManagementFactory.getPlatformMBeanServer() code and see what's going on. > DSO can create the 0th MBean server and break code that assumes that this > instance is the platform default mbean server > ----------------------------------------------------------------------------------------------------------------------- > > Key: CDV-260 > URL: https://jira.terracotta.org/jira//browse/CDV-260 > Project: Community Development > Issue Type: Bug > Reporter: Tim Eck > Assigned To: DSO Team > > From the forums: http://forums.terracotta.org/forums/posts/list/235.page > We might need to rethink the conditions in which we are the one creating the > first mbean server. At the very least, something that gives a user a means to > control this aspect a little more could go a long way -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://jira.terracotta.org/jira//secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
