1 Reply Latest reply on Jul 24, 2006 10:54 AM by Jason Sicotte

    HASingleton Services on 4.0.4 not working

    Mark French Newbie

      Hi,

      I have a number of schedulable services which need to run as HA Singletons. I have added the following line to their service descriptors:

      jboss.ha:service=HASingletonDeployer,type=Barrier

      When I fire up jboss they are created but never scheduled at all. Removing the above attribute and they run as expected. The following are the service descriptors:

      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <classpath codebase="lib" archives="scheduler-plugin.jar"/>
      
       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name="eventmanager:service=FrequencyEventScheduler">
       <depend>jboss.ha:service=HASingletonDeployer,type=Barrier</depend>
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.transtoll.modules.eventmanager.schedulables.jboss.FrequencyEventSchedulable</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <attribute name="SchedulePeriod">60000</attribute>
       <depends>eventmanager:service=initialisation</depends>
       </mbean>
      
       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name="eventmanager:service=MetricEventScheduler">
      <depend>jboss.ha:service=HASingletonDeployer,type=Barrier</depend>
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.transtoll.modules.eventmanager.schedulables.jboss.MetricEventSchedulable</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <attribute name="SchedulePeriod">60000</attribute>
       <depends>eventmanager:service=initialisation</depends>
       </mbean>
      
       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name="eventmanager:service=DurationEventScheduler">
      <depend>jboss.ha:service=HASingletonDeployer,type=Barrier</depend>
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.transtoll.modules.eventmanager.schedulables.jboss.DurationEventSchedulable</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <attribute name="SchedulePeriod">60000</attribute>
       <depends>eventmanager:service=initialisation</depends>
       </mbean>
      
       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name="eventmanager:service=MetricPersistenceScheduler">
      <depend>jboss.ha:service=HASingletonDeployer,type=Barrier</depend>
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.transtoll.modules.eventmanager.schedulables.jboss.MetricPersistenceSchedulable</attribute>
       <attribute name="InitialStartDate">NOW</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <attribute name="SchedulePeriod">60000</attribute>
       <depends>eventmanager:service=initialisation</depends>
       </mbean>
      </server>


      Any thoughts as to what I'm doing wrong?

      Cheers

      Mark