2 Replies Latest reply: Sep 13, 2004 5:38 PM by Ironbeard RSS

    JBoss & Quartz

    lumin Newbie

      Hi!

      I would extremely appreciate if someone with experience could figure out how to configure quartz enterprise scheduler with JBoss. I'm really confused about all those mbeans, xml and property files.

      TIA,
      lumin

        • 1. Re: JBoss & Quartz
          Erik Itter Newbie

          i would like to know how that works, too...

          I planned to use the quartz web-application to configure the jobs (i allready have the jboss web-service running) for a data collecting application where the connectors for the different sources need cron-like scheduling.

          • 2. Re: JBoss & Quartz
            Ironbeard Newbie

            There's an example JBoss MBean in the Quartz distribution (org.quartz.ee.jmx.jboss). There's also an example deployment
            descriptor.

            Here's another example that creates a Quartz service with the name
            NTScheduler, using a Sybase datasource.

            <?xml version="1.0" encoding="UTF-8"?>
            <server>
             <classpath codebase="." archives="quartz.jar"/>
            
             <mbean code="org.quartz.ee.jmx.jboss.QuartzService"
             name="user:service=QuartzService,name=NTScheduler">
            
             <depends>jboss.jca:service=LocalTxCM,name=jdbc/SybaseDB</depends>
             <depends>jboss.jca:service=NoTxCM,name=jdbc/SybaseDB_NO_TX</depends>
            
             <attribute name="JndiName">NTScheduler</attribute>
             <attribute name="Properties">
             org.quartz.scheduler.instanceName = NTScheduler
             org.quartz.scheduler.instanceId = AUTO
             org.quartz.scheduler.rmi.export = false
             org.quartz.scheduler.rmi.proxy = false
             org.quartz.scheduler.xaTransacted = false
            
             org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
             org.quartz.threadPool.threadCount = 5
             org.quartz.threadPool.threadPriority = 5
             org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
            
             org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
             org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.MSSQLDelegate
             org.quartz.jobStore.tablePrefix = TB_NT_QRTZ_
             org.quartz.jobStore.dataSource = NTSchedDS
             org.quartz.jobStore.nonManagedTXDataSource = NTSchedDS_NoTx
             org.quartz.jobStore.misfireThreshold = 5000
            
             org.quartz.dataSource.NTSchedDS.jndiURL = java:/jdbc/SybaseDB
             org.quartz.dataSource.NTSchedDS_NoTx.jndiURL = java:/jdbc/SybaseDB_NO_TX
             </attribute>
             </mbean>
            </server>