6 Replies Latest reply on Dec 9, 2004 1:05 AM by Scott Stark

    Deploying Quartz Scheduler in jboss-3.2.6

    Rachna Aggarwal Newbie

      I am using Quartz Scheduler in my application and I've written my own jboss-service.xml file for configuration of Quartz Service.
      But I'm having some problem while deploying in jboss-3.2.6, which was not there in jboss-3.2.3(FYI, I'm using ListenerServiceMBeanSupport provided by jboss version 3.2.6):
      Since Quartz includes a quartz-service.xml in the jar "quartz-_1_4.jar", Jboss finds it when Quartz is used and throws a message that the service isn't correctly configured and is awaiting further MBean definitions even though the way I am using Quartz everything is actually configured correctly. Personally, I'm never going to use the quartz-service.xml provided in the jar. Can somebody please help me out here?

      Thanks,
      Rachna

        • 1. Re: Deploying Quartz Scheduler in jboss-3.2.6
          Evyatar Kafkafy Newbie

          can you post your jboss-service.xml file?

          • 2. Re: Deploying Quartz Scheduler in jboss-3.2.6
            Rachna Aggarwal Newbie

            I am sorry the code wasn't displayed correctly. So, again, posting it:

            <server>
            <mbean code="scheduler.service.QuartzService"
             name="user:service=myQuartzService,name=myQuartzService">
             <attribute name="JndiName">nuQuartzService</attribute>
            
            <attribute name="SubscriptionList">
             <subscription-list>
             <mbean name="jboss.system:type=Server">
             <notification type="org.jboss.system.server.started"/>
             </mbean>
             </subscription-list>
            </attribute>
            
            <attribute name="Properties">
            
            #====Configure Scheduler=====================#
            org.quartz.scheduler.instanceName = MyQuartzScheduler
            org.quartz.scheduler.instanceId = AUTO
            org.quartz.scheduler.rmi.export = false
            org.quartz.scheduler.rmi.proxy = false
            org.quartz.scheduler.xaTransacted = false;
            org.quartz.scheduler.dbFailureRetryInterval = 5000
            
            #====Configure Thread Pool===================#
            org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
            org.quartz.threadPool.threadCount = 15
            org.quartz.threadPool.threadPriority = 5
            org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
            
            #====Configure Job Store=====================#
            org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
            org.quartz.jobStore.misfireThreshold = 60000
            org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
            org.quartz.jobStore.dataSource = nuDS
            org.quartz.jobStore.dontSetAutoCommitFalse = DONT_TURN_OFF_AUTO_COMMIT
            org.quartz.jobStore.tablePrefix = qrtz_
            
            #====Configure Data Source++++++=============#
            org.quartz.dataSource.nuDS.driver =
            org.quartz.dataSource.nuDS.URL =
            org.quartz.dataSource.nuDS.user =
            org.quartz.dataSource.nuDS.password =
            org.quartz.dataSource.nuDS.maxConnections = 3
            
            #====Configure Scheduler Plugins=============#
            org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
            org.quartz.plugin.jobInitializer.fileName = data/jobs.xml
            org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
            org.quartz.plugin.jobInitializer.failOnFileNotFound = true
            
            </attribute>
            
            </mbean>
            
            <mbean code="scheduler.service.SchedulerProvider"
             name="user:service=SchedulerProvider" >
            
             <depends>jboss:service=Naming</depends>
            </mbean>
            
            <mbean code="scheduler.service.SchedulerAdmin"
             name="user:service=SchedulerAdmin" >
            
             <depends>jboss:service=Naming</depends>
            </mbean>
            </server>


            • 3. Re: Deploying Quartz Scheduler in jboss-3.2.6
              Evyatar Kafkafy Newbie

              If you mean that the default jboss-service.xml is inside quartz-1.4.0.sar - You can unzip the sar to a subdirectory of default/deploy and name that subdirectory "quartz-1.4.0.sar", then replace the file jboss-service.xml in default\deploy\quartz-1.4.0.sar\META-INF with your own file.
              when JBoss sees a subdirectory named *.sar, it handles it as if it is a sar file.

              • 4. Re: Deploying Quartz Scheduler in jboss-3.2.6
                Scott Stark Master

                What is wrong with simply removing the quartz-service.xml from the jar?

                • 5. Re: Deploying Quartz Scheduler in jboss-3.2.6
                  Rachna Aggarwal Newbie

                  Yes, the solution I implemented was this only. I removed the quartz-service.xml file from the jar but I was looking for a better solution since later if a new version of quartz_1_4.jar is released then I'll have to keep in mind of removing the file again from the jar & then using it.

                  • 6. Re: Deploying Quartz Scheduler in jboss-3.2.6
                    Scott Stark Master

                    Put it in the server/xxx/lib directory then.