4 Replies Latest reply on Jun 12, 2003 2:07 PM by nash foster

    Create a scheduler

    m1 Newbie

      I have tested the SchedulableExample in JBoss 3.0.7 and I'm trying to make my own work :

      I have 3 files :

      AirimiSchedulerMBean.java (Interface)

      I put these files in Timer.jar that I moved to /server/all/deploy. There is no problem during the deployment (I mean no error message).

      So I'm trying to change xml files (scheduler-service.xml, user-service.xml and schedule-manager-service.xml) to launch my schedulable class instead of the example. I got a message : "Airimi:service=Scheduler is not registered".

      So I just need to know where I can register my service and if i can put an xml file in my jar (like schedule-service.xml, as ejb-jar.xml for an EJB).

      Please, do not tell me to read the documentation because I've done it many times and the forums also ;)

      Thank you

        • 1. Re: Create a scheduler
          Harald Gliebe Novice

          Rename your jar-file to *.sar and put your mbean declaration in META-INF/jboss-service.xml.


          • 2. Re: Create a scheduler
            m1 Newbie

            So I have used the example xml file of the documentation and adapt it to my needs.

            But I still got some problems with some declarations (Here is my jboss-service.xml) :


            I got these messages when I deploy :

            No ClassLoaders found for: org.jboss.util.AirimiScheduler
            No ClassLoaders found for: org.jboss.util.Scheduler
            jboss:type=example,name=schedulable is not registered.

            As my AirimiScheduler class is part of Timer package in Timer.sar, I have tried codebase=org.jboss.util.Timer.AirimiScheduler but it does not work.

            I don't understand why there is no SchedulableExample class in org.jboss.util whereas the codebase is org.jboss.util.SchedulableExample...

            • 3. Re: Create a scheduler
              m1 Newbie

              I am looking for an explanation or an example for a jboss-service.xml file.

              I have tried different examples from different documentation and each time there is no deploy descriptor... Why ???

              Do I need to change the configuration of jboss to load my own service ???

              Answer me please...

              • 4. Re: Create a scheduler
                nash foster Newbie

                This is the XML I use in my jboss-service.xml. I found a couple of things that worked but the easiest thing I found was to package my classes in a jar file and deploy that, then create a sar file with just META-INF/jboss-service.xml in it... it seems to find things reasonably well, that way. Having a bit of weirdness when the app is redeployed, though.

                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE server>