0 Replies Latest reply on Sep 7, 2008 12:49 AM by Oscar cs

    SAR with HASingletonController deployed on EAR

    Oscar cs Newbie

      Anynone knows if it is possible to deploy MBeans controlled by HASingletonController packaged as SAR, itself packaged with other modules inside an EAR deployed in farm?.

      I am trying with no luck, but i am not sure what is the root of the problem, as JBoss docs says "If your service is an Mbean (i.e., not a J2EE deployment like an ear or war or jar), you can deploy it along with a service called an HASingletonController in order to turn it into an HA singleton".

      This sentence is confusing me; only MBeans are services, right?. Then... whats the meaning.

      The SAR jboss-service.xml is:

       <mbean code="sample.SampleService"
       <!-- HASingletonController to run the above MBean as a singleton -->
       <mbean code="org.jboss.ha.singleton.HASingletonController"
       <attribute name="TargetName">sample:service=SampleService</attribute>
       <attribute name="TargetStartMethod">startSingleton</attribute>
       <attribute name="TargetStopMethod">stopSingleton</attribute>

      The MBean extends ServiceMBeanSupport and has startSingleton/stopSingleton methods like the interface does. It acts as a HASingleton with the Barrier method but not with HASingletonController.

      Thanks in advance

      - Oscar