0 Replies Latest reply on Mar 3, 2005 10:57 AM by chris_pollentier

    All singleton services on the same JBoss

    chris_pollentier

      A question about Singleton services:

      Assuming that I put singleton services NOT in the deploy-hasingleton directory, but in the deploy (or farm) directory:
      When a master is chosen for the singleton services, is there always one JBoss instance chosen as master for ALL singleton services, or can each singleton service have it's 'own' master assigned.

      E.g. if I configure the following two services SingletonA and SingletonB, each with a SingletonController:

       <mbean code="cluster.test.singleton.SingletonA"
       name="cluster.test:service=SingletonA">
       </mbean>
      
      
       <mbean code="cluster.test.singleton.SingletonB"
       name="cluster.test:service=SingletonB">
       </mbean>
      
       <mbean code="org.jboss.ha.singleton.HASingletonController"
       name="cluster.singleton:service=SingletonAController">
       <depends>cluster.test:service=SingletonA</depends>
       <depends>jboss:service=DefaultPartition</depends>
       <attribute name="TargetName">kiala.test:service=SingletonA</attribute>
       <attribute name="TargetStartMethod">startSingleton</attribute>
       <attribute name="TargetStopMethod">stopSingleton</attribute>
       </mbean>
      
       <mbean code="org.jboss.ha.singleton.HASingletonController"
       name="kiala.singleton:service=SingletonBController">
       <depends>kiala.test:service=SingletonB</depends>
       <depends>jboss:service=DefaultPartition</depends>
       <attribute name="TargetName">kiala.test:service=SingletonB</attribute>
       <attribute name="TargetStartMethod">startSingleton</attribute>
       <attribute name="TargetStopMethod">stopSingleton</attribute>
       </mbean>
      


      I deploy these services on multiple JBoss instances in the deploy directory. When I startup the cluster, the services are running on only one JBoss.

      My question is, will these services always run on the same JBoss. If the current master goes down, will there be one new master selected for all services, or will one JBoss instance be selected for each service separately, possibly causing singletonA and singletonB to run on differnet servers.

      I am running JBoss-3.2.4 (will soon upgrade to 3.2.7, so if there is a difference related to this question please tell)


      Chris