1 Reply Latest reply on Oct 17, 2006 9:11 PM by jay.guidos

    ServiceController - does not honor 'nested' dependencies dur

    jay.guidos

      Hi All,

      I am using 4.0.3SP1, the 'all' configuration.

      I am creating a HASingleton that depends on an SLSB and a DataSource. Using the HASingletonController MBean means I have a A depends apon B depends apon C situation:

      SingletonController depends on Singleton depends on DataSource


      If I simply deploy the singleton as a regular MBean (i.e. not a singleton) all dependencies are resolved correctly. But if I make the singleton depend on the HASingletonController then I get an error that the DataSource is not started.

      I have checked the ServiceController code, and the start() method seems to discard and ignore the dependencies of a dependent MBean (with a vague comment on avoiding 'cyclical dependencies') when ensuring the dependent beans are started. How can I ensure the dependencies are honored here?

      Here is my singleton deployment descriptor:

       <!-- FIX Engine Deployment -->
       <mbean code="com.amsl.bids3.fixgw.session.jboss.FIXGWManagerDeployer"
       name="amsl.bids3.fixgw:service=FIXGWManger,name=GWMGR-1">
       <attribute name="NonTxDataSourceJndiName">java:/amsl/bids3/FIXGatewayNonTxDataSource</attribute>
       <attribute name="InboundLocalHomeJndiName">FIXGWInboundLocalHome</attribute>
       <depends>jboss.jca:service=DataSourceBinding,name=amsl/bids3/FIXGatewayNonTxDataSource</depends>
       <depends>jboss.j2ee:jndiName=FIXGWInboundLocalHome,service=EJB</depends>
       </mbean>
      
       <mbean code="org.jboss.ha.singleton.HASingletonController"
       name="amsl.bids3.fixgw:service=FIXGWManagerSingletonController,name=HAControllerForGWMGR-1">
       <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
       <depends optional-attribute-name="TargetName">amsl.bids3.fixgw:service=FIXGWManger,name=GWMGR-1</depends>
       <attribute name="TargetStartMethod">startSingleton</attribute>
       <attribute name="TargetStopMethod">stopSingleton</attribute>
       </mbean>