1 Reply Latest reply on Sep 1, 2005 2:31 PM by Jeff Markel

    Scheduler-service starts before jar is deployed

    Jeff Markel Newbie

      I'm trying to get the scheduler service to properly invoke a class of mine.

      platform is JBoss 4.0.2

      When server is started up, it tries to start my scheduler tasks, as specified in deploy/scheduler-service.xml. The method that is to be called is in a jar, also in the deploy directory.

      The problem is that the scheduler service starts before the my jar is deployed, causing a bunch of errors due to my class/method not being available in the classpath yet.

      If I put my jar in the lib directory as well as the deploy directory, all is copacetic with the scheduler, but I then have duplicate classes in the classpath and I can't do a hot-deploy with my jar anymore.

      How can I configure things so the scheduler will find the proper classes needed?



        • 1. Re: Scheduler-service starts before jar is deployed
          Jeff Markel Newbie

          I seem to have answered my own question (I think)

          In jboss-service.xml I switched my URLComparator from the default DeploymentSorter to PrefixDeploymentSorter, and then prefixed deploy/scheduler-service.xml with a single numeric digit - i.e. it's now named 9scheduler-service.xml.

          That forces it to be deployed after all the un-numbered and lower-numbered objects in the deploy directory.

          It seems to work...