Right. The problem occurs when A.startService() assumes that any dependent services B have already been created. But Adrian points out that B should not reference A in createService(). It seems like this is the key contract - that services can't reference dependent services during create(). Excluding special cases such as cyclic dependencies, it seems that the startup process won't be dependent on the location of the mbean definitions as long as this contract is satisfied.
>>> Alexey Loubyansky <[EMAIL PROTECTED]> 5/22/2006 6:33 AM >>> Unless A also depends on B and, as a workaround to not supported cyclic dependencies, checks in its start method that B has been created and hopes that B will be started... any time soon. Adrian Brock wrote: > The WIKI page says that B should not reference A in its createService() > so what difference does it make? > > "create() - the service should do any setup and __not reference another > service__" > > On Fri, 2006-05-19 at 11:46 -0600, Jerry Gauthier wrote: >> According to the wiki page at >> http://wiki.jboss.org/wiki/Wiki.jsp?page=ServiceLifecycle , the >> service lifecycle for two Services A and B is as follows. >> >> If Service B is dependent on Service A, the startup sequence is the >> following. >> ServiceA.createService(); >> ServiceB.createService(); >> ServiceA.startService(); >> ServiceB.startService(); >> >> It appears that this is only true if Service A and Service B are >> defined in the same service file. If the services are defined in >> different files, the startup sequence is the following. >> ServiceA.createService(); >> ServiceA.startService(); >> ServiceB.createService(); >> ServiceB.startService(); >> >> Obviously this difference is significant for any service that needs to >> be created before the primary service is started. Is this intentional >> (or am I overlooking something)? I haven't found any reference to this >> behavior in JBoss doc. >> >> >> >> >> >> ------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job easier >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> JBoss-Development mailing list >> JBoss-Development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jboss-development ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development