1 Reply Latest reply on Oct 17, 2006 9:11 PM by Jay Guidos

    ServiceController - does not honor 'nested' dependencies dur

    Jay Guidos Newbie

      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"
       <attribute name="NonTxDataSourceJndiName">java:/amsl/bids3/FIXGatewayNonTxDataSource</attribute>
       <attribute name="InboundLocalHomeJndiName">FIXGWInboundLocalHome</attribute>
       <mbean code="org.jboss.ha.singleton.HASingletonController"
       <depends optional-attribute-name="TargetName">amsl.bids3.fixgw:service=FIXGWManger,name=GWMGR-1</depends>
       <attribute name="TargetStartMethod">startSingleton</attribute>
       <attribute name="TargetStopMethod">stopSingleton</attribute>