6 Replies Latest reply on Aug 7, 2002 5:50 AM by adrian.brock

    JBOSS Scheduler

    jposuser

      Hi,
      We are using the combination of JBOSS Scheduler and Timer to execute A Class Repeatedly. Right now the Class is packaged in a JAR. If we deploy only the JAR then the Scheduler Class works just fine.
      But we have to deploy an EAR, which contains the JAR plus another WAR and some other Files. Now when we deploy the EAR and try to run the Scheduler Class, we get an error, displaying "Class not found." and the server shuts down.
      So this is my question:- How do you make the Scheduler Service work with an EAR, with the Schedulable Class inside a JAR and the JAR which is inside the EAR. The EAR is the file which is deployed.

      Any help and suggestions will be welcome.

      Thanks in Advance.

        • 1. Re: JBOSS Scheduler

          Which version of JBoss?
          This should work with 3.0 and the UnifiedClassLoaders.

          "and the server shuts down" ?????
          can you post the output, server.log should give
          you more information?

          Regards,
          Adrian

          • 2. Re: JBOSS Scheduler
            jposuser

            Hi,
            We are using JBOSS 2.4.6 and Catalina 4.0
            I will post today the server log.

            Have a nice day

            • 3. Re: JBOSS Scheduler
              jposuser

              Hi Adrian,

              I am uploading the Server logs. The file "Server log.txt", is the log file created by JBOSS.

              The File "Starting JBOSS.txt" is the file which contains the contents of the console where the JBOSS server is started. For Example on the Command Prompt we give "run_with_catalina" to start the server, then it displays many items on the command prompt. That display is present in this file "Starting JBOSS.txt".

              The Last file "JBOSS.jcml Configuration File.txt" is part of the configuration file jboss.jcml present inside JBOSS\CONF\CATALINA. It contains the configuration done for the timer/Scheduler Service.

              I hope that these file help you. If you require some other files then please do drop me a line.

              Thanks and hope to hear from you soon.

              • 4. Re: JBOSS Scheduler

                In the 2.4 series the MBean won't have access to
                ear classes. They are in a child classloader.

                The only easy way to do this for 2.4 is to put the
                class in a jar in the lib/ext directory. But this
                means you cannot hot-deploy it.

                Regards,
                Adrian

                • 5. Re: JBOSS Scheduler
                  jposuser

                  Thanks Adrian for your reply.
                  I was wondering if you could help me do the same with jboss 3.0. I have put the Scheduler class configuration inside the the "schedule-service.xml" file. I have put the timer MBEAN inside the jboss-service.xml file inside SERVER/DEFAULT/DEPLOY.
                  Everything else remains the same. The Schedulable class is inside a JAR. The JAR is packaged/put inside the EAR and the EAR file is deployed.
                  The Timer service starts, but the scheduler service gives an error "Class not found". Thus the Scheduler Service is not started.
                  Also one more thing, unlike 2.4.6 JBOSS server starts normally and all other functions excluding the Scheduler are avaliable. In 2.4.6 the server used to shut down.
                  Your time and help is appreciated
                  Bye

                  • 6. Re: JBOSS Scheduler

                    Hi,

                    You will need to place a dependency between the
                    schedule-service and the ear. So the scheduler doesn't
                    start until after the ear is available.

                    The easiest mechanism is probably to number
                    the scheduler xml. The numbered deployments start at
                    the end in order.
                    e.g. 10scheduler-service.xml
                    You might need to modify jboss-service.xml to
                    use the PrefixDeploymentSorter if it is not enabled
                    by default.
                    Other mechanisms exist, checkout the JBoss3 quickstart guide form sourceforge.

                    You don't need to start the timer explicitly, the
                    scheduler will do this for you.

                    I don't know why 2.4.6 is stopping. I have never seen
                    that before. Does it start if you remove the scheduler
                    from the configuration?

                    Regards,
                    Adrian