Hi

Can you try set the job option as

job.durability=true

in the uri. That may work as that is the setter name in the job impl class.


On Mon, Oct 7, 2013 at 2:03 PM, Mark Richards - News Systems and
Architecture <mark.richa...@bbc.co.uk> wrote:
> Hi,
>
> I'm using Camel 2.12.1, Quartz 2.2.0, Blueprint and Mysql 5.5 in Karaf 2.3.1 
> and attempting to use clustering, without any success :-(
>
>
>
> My aim is to run multiple VMs that will load balance Quartz camel routes and 
> fail over should one stop (losing the odd job schedule isn't too important, 
> but being down for more than 5-10 minutes would be unacceptable; so 
> clustering seems a logical solution. :-)
>
>
>
> Steps:
>
> - When I build and start the first Karaf in a Linux VM... it will start 
> Quartz2 and begin triggering jobs.
>
> - When I copy the Karaf build into another VM and start Karaf (both 
> connecting to the same db) I get complaints about Job durability.
>
> - If I restart the first Karaf; it no longer works with Quartz2, also 
> complaining about Job Durability.
>
>
>
> So, I'd really appreciate any help or experience anyone has with this; I'm 
> hoping I'm not the first to run Camel Quartz2 clusters and if anyone has an 
> example set of quartz 2 properties and a camel route that works in Blueprint, 
> perhaps Spring (although trying to avoid going Spring heavy); that'd be great!
>
>
>
> Alternatively, it there's a way to wire it in in Java DSL, I can give that a 
> go if there's a way to hook the Camel context in from the Blueprint somehow!?
>
>
>
> My setup is below! Would really appreciate some help on this; Camel and 
> Quartz seem like a great fit! :-)
>
> The properties seem to work fine if I use Quartz without Camel (Example 13 in 
> Quartz 2 documentation).
>
>
>
> Thanks
>
> Mark
>
>
>
> I have a blueprint including the following:
>
>   <bean id="quartz2" 
> class="org.apache.camel.component.quartz2.QuartzComponent">
>
>     <property name="properties" ref="props" />
>
>   </bean>
>
>   <reference id="myBean" interface="example.com.MyBean" 
> availability="mandatory" />
>
>   <camel:camelContext id="blueprintContext" trace="true">
>
>     <camel:route>
>
>       <camel:from 
> uri="quartz2://examples/example?job.name=test1&amp;deleteJob=false&amp;stateful=true&amp;cron=0/10+*+*+*+*+?"
>  />
>
>       <camel:bean ref="myBean" method="fire" />
>
>     </camel:route>
>
>   </camel:camelContext>
>
>
>
> But get the error:
>
> Failed to create route route1: 
> Route(route1)[[From[quartz2://examples/example?job.name=tes... because of 
> Failed to resolve endpoint: 
> quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&job.name=test1&stateful=true
>  due to: Jobs added with no trigger must be durable.
>
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve 
> endpoint: 
> quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&job.name=test1&stateful=true
>  due to: Jobs added with no trigger must be durable.
>
> Caused by: org.quartz.SchedulerException: Jobs added with no trigger must be 
> durable.
>
>
>
>
>
>
>
> Quartz properties:
>
> org.quartz.scheduler.instanceName: TestScheduler
>
> org.quartz.scheduler.skipUpdateCheck: true
>
> org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
>
> org.quartz.threadPool.threadCount: 5
>
> org.quartz.threadPool.threadPriority: 5
>
> org.quartz.jobStore.misfireThreshold: 60000
>
> org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
>
> org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
>
> org.quartz.jobStore.dataSource=myDS
>
> org.quartz.jobStore.tablePrefix=QRTZ_
>
> org.quartz.jobStore.isClustered=true
>
> org.quartz.dataSource.myDS.driver: com.mysql.jdbc.Driver
>
> org.quartz.dataSource.myDS.URL: jdbc:mysql://windowshost:3306/quartz
>
> org.quartz.dataSource.myDS.user: root
>
> org.quartz.dataSource.myDS.password: password
>
> org.quartz.dataSource.myDS.maxConnections: 8
>
> org.quartz.dataSource.myDS.validationQuery: select 0
>
>
>
> Using a feature like:
>
> <feature>
>
>   <bundle 
> start-level="40">mvn:org.apache.camel/camel-core/${camel.version}/jar</bundle>
>
>   <bundle 
> start-level="40">mvn:org.apache.camel/camel-blueprint/${camel.version}/jar</bundle>
>
>   <bundle 
> start-level="40">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.c3p0/${c3p0.version}/jar</bundle>
>
>   <bundle 
> start-level="40">mvn:org.apache.camel/camel-quartz2/${camel.version}/jar</bundle>
>
>   <bundle 
> start-level="40">mvn:org.quartz-scheduler/quartz/${quartz2.version}/jar</bundle>
>
>   <bundle 
> start-level="40">mvn:mysql/mysql-connector-java/${mysql.version}/jar</bundle>
>
>   <bundle 
> start-level="40">mvn:example/osgi-fragment-c3p0-mysql/${project.version}/jar</bundle>
>  <- fragment bundle imports Mysql driver package into C3P0 bundle
>
> </feature>
>
>
>
>
> ----------------------------
>
> http://www.bbc.co.uk
> This e-mail (and any attachments) is confidential and may contain personal 
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance 
> on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
> ---------------------



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to