1 Reply Latest reply on Aug 22, 2005 6:29 PM by genman

    Deployment Order of Scheduler and Schedulable task

    laughtonjackson

      I have set up a scheduler service to call a class within my .WAR file which sits in the /default/deploy folder.

      It works great except?

      during startup, JBoss reports that it cannot yet find user class.
      I assume it?s because the startup has not deployed my WAR file yet.

      After wading through your forums, I found two workarounds:

      1) after startup completes, simply ?touch? the scheduler-service.xml file and the scheduler starts correctly.

      2) create a my-scheduler-service.xml in the /deploy/deploy.last folder


      Is there a more appropriate way to get the ?startup? dependencies set up correctly.


      Many Thanks,
      Laughton Jackson



      Here?s the contents of my /default//deploy/scheduler-service.xml


      mbean code="org.jboss.varia.scheduler.Scheduler"
      name="com.portal.web:service=DailyTasks">
      attribute name="StartAtStartup">true
      attribute name="SchedulableClass">com.portal.web.ScheduledTasks
      attribute name="SchedulableArguments">dailyTasks,86400000
      attribute name="SchedulableArgumentTypes">java.lang.String,long
      attribute name="InitialStartDate">08/15/05 5:00 AM
      attribute name="SchedulePeriod">86400000
      attribute name="InitialRepetitions">-1
      attribute name="TimerName">DailyTasksTimer
      depends>
      mbean code="javax.management.timer.Timer"
      name="jboss:service=DailyTasksTimer"/>
      /depends>
      /mbean>