Well, see the code I sent under separate cover, but here's how i think you
can get exactly the same code execution sequence:

[ClusterPartition created, configured, but not started]

HAJNDI created, start does nothing 
(other needed mbeans also created and started similarly)

Now the dependencies for ClusterPartition are satisfied, it is started.
It does:
old init code
calls registerCluster(haPartition) on each of the mbeans it depends on
(HAJNDI).  This method includes the former init code.
old start code
calls startFromCluster(haPartition) on each of the mbeans it depends on
(HAJNDI).  This method includes the former start code.

Isn't this the same code in the same order as executed previously?

I think you can get away with only the calls to registerCluster, no
startFromCluster, although this might be why the code I sent doesn't
actually work at the moment;-)

david jencks

On 2001.11.13 12:47:08 -0500 Andreas Schaefer wrote:
> Hi Geeks
> 
> I don't think the mbean-ref list will WORK. As you said the
> ClusterPartition
> will be created, attributes are set BUT it won't be started.
> 
> AFAIK ClusterPartition needs to initialize JChannel before the other HA-
> service can start, doesn't it? Yeah, but then this initialization is NOT
> STARTED
> with the "mbean-ref-list"! So, how to you want to initialize the JChannel
> on
> ClusterPartition before the other HA-services are started ? REMEBER that
> there are attributes which could be set after the creation of the MBean.
> 
> Andy
> 
> > > >   <mbean code="org.jboss.ha.framework.server.ClusterPartition"
> > > > name="JBOSS-SYSTEM:service=DefaultPartition">
> > > >   </mbean>
> > > >
> > > >    <mbean
> code="org.jboss.ha.hasessionstate.server.HASessionStateService"
> > > > name="JBOSS-SYSTEM:service=HASessionState">
> > > >       <mbean-ref
> name="ClusterPartition">JBOSS-SYSTEM:service=DefaultPartition</mbean-ref>
> > > >   </mbean>
> > > >
> > > >
> > > >   <mbean code="org.jboss.ha.jndi.HANamingService"
> > > > name="JBOSS-SYSTEM:service=HAJNDI">
> > > >       <mbean-ref
> name="ClusterPartition">JBOSS-SYSTEM:service=DefaultPartition</mbean-ref>
> > > >   </mbean>
> > > >
> > > >
> > > > rather than like this:
> > > >
> > > >
> > > >   <mbean code="org.jboss.ha.framework.server.ClusterPartition"
> > > > name="JBOSS-SYSTEM:service=DefaultPartition">
> > > >     <mbean-ref-list name="SynchronizedMBeans">
> > > >
> > > > <mbean-ref-list-element>JBOSS-SYSTEM:service=HASessionState</mbean
> > > > -ref-list-element>
> > > >
> > > > <mbean-ref-list-element>JBOSS-SYSTEM:service=HAJNDI</mbean-ref-lis
> > > > t-element>
> > > >     </mbean-ref-list>
> > > >   </mbean>
> > > >
> > > >    <mbean
> code="org.jboss.ha.hasessionstate.server.HASessionStateService"
> > > > name="JBOSS-SYSTEM:service=HASessionState">
> > > >   </mbean>
> > > >
> > > >
> > > >   <mbean code="org.jboss.ha.jndi.HANamingService"
> > > > name="JBOSS-SYSTEM:service=HAJNDI">
> > > >   </mbean>
> 
> > BTW, with the mbean-ref-list
> > > example can you please describe to me how calls are ordered?  What
> MBeans
> > > get created first?  What order does start() get called?
> >
> > The mbeans are created and configured in what ever order they happen to
> be
> > encountered by the autodeployer/ServiceDeployer/code directly calling
> > ServiceDeployer etc.
> >
> > ServiceConfigurator returns a list of objectnames referenced in
> mbean-ref
> > and mbean-ref-list/mbean-ref-list-element elements. The
> ServiceController
> > finds out if all of these have been started: if so it registers (with
> > itself) and starts the mbean.  If not, it waits, and every time an
> mbean
> is
> > started checks to see if all dependencies are satisfied for waiting
> beans.
> > Once all the dependencies are satisfied for a waiting mbean, it is
> started.
> >  The reverse happens when you stop or undeploy an mbean.
> >
> > To look at the examples, in the first format the ClusterPartition can
> be
> > started immediately, since it has no mbean-refs.  No matter when the
> > HASessionState and HAJNDI mbeans are encountered (i.e. before the
> > ClusterPartition mbean), they will not be started until after the
> > ClusterPartition mbean is started.
> >
> > In the second format, the ClusterPartition mbean will be created and
> > configured, but not started until after the HASessionState and HAJNDI
> > mbeans are started.
> 
> 
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to