[jboss-user] [EJB 3.0] - Re: MBean start ordering in 5.0CR2

huberth do-not-reply at jboss.com
Thu Oct 16 15:53:52 EDT 2008


Look closely at the chain of calls between the lower installMBean and the resolveContexts calls.  Further down inside the install call from installMBean the code eventually transitions the state of StatisticsMBean to created, then started, then installed, constantly calling resolveContexts(boolean) along the way.  That call to resolveContexts eventually figures out that StatisticsMBean is installed, which BWAllocatorAdminMBean requires, so it installs that MBean as well (although, stepping through I didn't quite figure out exactly how that happened, to be honest).

The problem is that the actual create/start methods get invoked on StatisticsMBean only after the install call returns, much later.

I would have thought those calls would have been more closely tied to the actual state transitions that they represent... say, as part of StartStopLifecycleAction.installAction() for example.

There seems to be an odd inconsistency in the approach to handling dependencies here, too.  We have both the recursion thing going on, as well as the iteration going on in resolveContexts.  That is, of course, from a fairly superficial understanding of the code and the problem space, so maybe there's nothing to that.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182766#4182766

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182766



More information about the jboss-user mailing list