0 Replies Latest reply on Jan 2, 2014 10:17 PM by marwen

    Fuse ESB 7.1 - Camel-Quartz Clustering using JobStore

    marwen

      Hi,

       

      I've been trying to use Quartz JobStores in order to run 2 active/active Fuse servers with no success. (my servers use quartz extensively, hence the need to cluster quartz)

       

      I'm having the following exception

      org.quartz.impl.jdbcjobstore.NoSuchDelegateException: Couldn't load delegate class: org.quartz.impl.jdbcjobstore.oracle.OracleDelegate from bundle 277 (com.exmple.camel-quartz-test)
           at org.quartz.impl.jdbcjobstore.JobStoreSupport.getDelegate(JobStoreSupport.java:3090)[272:org.apache.servicemix.bundles.quartz:1.8.5.1]
           at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1558)[272:org.apache.servicemix.bundles.quartz:1.8.5.1]
      

       

      I already added the quartz-oracle version 1.8.5 (as I'm connecting to an Oracle DB) to my pom.xml and configured the properties.

       

      I'm suspecting a problem related to OSGI wiring but not quite sure.

       

      Any help would be appreciated, thanks.

       

      Camel Blueprint

           <bean id="quartz" class="org.apache.camel.component.quartz.QuartzComponent">
                <property name="propertiesFile" value="com/example/myquartz.properties"></property>
           </bean>
                      
           <camelContext trace="false" id="camel-context-test" xmlns="http://camel.apache.org/schema/blueprint">
          
                <route id="retrieveEvents">
                     <from uri="quartz://test/timer?trigger.repeatInterval=1000&amp;trigger.repeatCount=-1&amp;stateful=true"></from>
                     <log message="Testing node 2"></log>
                </route>
           </camelContext>
      

       

       

      myquartz.properties

      #============================================================================
      # Configure Main Scheduler Properties  
      #============================================================================
      
      org.quartz.scheduler.instanceName = MyClusteredScheduler
      org.quartz.scheduler.instanceId = AUTO
      
      #============================================================================
      # Configure ThreadPool  
      #============================================================================
      
      org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
      org.quartz.threadPool.threadCount = 25
      org.quartz.threadPool.threadPriority = 5
      
      #============================================================================
      # Configure JobStore  
      #============================================================================
      
      org.quartz.jobStore.misfireThreshold = 60000
      
      org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
      org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
      org.quartz.jobStore.useProperties = false
      org.quartz.jobStore.dataSource = myDS
      org.quartz.jobStore.tablePrefix = QRTZ_
      
      org.quartz.jobStore.isClustered = true
      org.quartz.jobStore.clusterCheckinInterval = 20000
      
      #============================================================================
      # Configure Datasources  
      #============================================================================
      
      org.quartz.dataSource.myDS.driver = ****
      org.quartz.dataSource.myDS.URL = jdbc:oracle:****
      org.quartz.dataSource.myDS.user = ***
      org.quartz.dataSource.myDS.password = ***
      org.quartz.dataSource.myDS.maxConnections = 5
      org.quartz.dataSource.myDS.validationQuery=select 0 from dual
      
      #============================================================================
      # Others  
      #============================================================================
      org.quartz.scheduler.threadsInheritContextClassLoaderOfInitializer = true
      org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
      

       

      Edited by: marwen on Jan 3, 2014 12:36 AM

       

      Edited by: marwen on Jan 3, 2014 3:17 AM