4 Replies Latest reply on Aug 4, 2006 4:54 AM by viy

    JBoss Mbean Dependencies - How to start scheduler services a

    whooi

      Hi guys,

      I am having trouble with the dependencies of "org.jboss.varia.scheduler.Scheduler". How do make the scheduler fires only after the EAR is fully deployed? This is my service.xml file:



      true
      com.acme.HelloWorld
      NOW
      5000
      -1



      Now, the scheduler manage to call HelloWorld.perform() every 5 seconds. But, it is firing too early. I want to starts the scheduler only after my EAR is fully deployed. Help is greatly appreciated.. Thank you..

        • 1. Re: JBoss Mbean Dependencies - How to start scheduler servic
          whooi

          Opps sorry, heres the service.xml

          <server>
           <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler">
           <attribute name="StartAtStartup">true</attribute>
           <attribute name="SchedulableClass">com.acme.HelloWorld</attribute>
           <attribute name="InitialStartDate">NOW</attribute>
           <attribute name="SchedulePeriod">5000</attribute>
           <attribute name="InitialRepetitions">-1</attribute>
           </mbean>
          </server>


          • 2. Re: JBoss Mbean Dependencies - How to start scheduler servic

            add a depends clause to your jboss-service.xml file:

            <server>
            <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler">
             <attribute name="StartAtStartup">true</attribute>
             <attribute name="SchedulableClass">com.acme.HelloWorld</attribute>
             <attribute name="InitialStartDate">NOW</attribute>
             <attribute name="SchedulePeriod">5000</attribute>
             <attribute name="InitialRepetitions">-1</attribute>
             <depends>EAR file name*</depends>
             </mbean>
            </server>
            

            *
            check jmx-console for the name of the ear, or if you want your schedular to depend explicitly on a Session Bean


            • 3. Re: JBoss Mbean Dependencies - How to start scheduler servic

              What is the format of depends tag?

              ....

              to make this work?

              I have tried endless variations using just the ear file name, EARDeployer service, EARDeployment service etc. Can't seem to make it work.

              Thanks,
              Joe

              • 4. Re: JBoss Mbean Dependencies - How to start scheduler servic
                viy

                Try to use jboss.j2ee:service=EARDeployment,url='EAR_FILE_NAME'