Hi,

You just store the cron-jobs into the same db, but this job could be create by 
different camel context as you start two camel context as a cluster.
So that could explain why the cron-jobs sometimes do work and sometimes don’t. 
If the camel context get the job that it create, it can work, but if the camel 
context get the one which it doesn’t create, you get the error.

To resolve this issue, we cannot share the job store across the camel contexts.


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On July 7, 2014 at 11:30:18 PM, alder (mathias.r...@t-systems.com) wrote:
> Hi,
>  
> I'm using camel version 2.12.3. together with quartz1 (db stored job store)
> component on websphere application server cluster.
> The camel context is defined using xml and spring. This is working as long
> as there is only one application deployed. When I try to deploy a second
> application using the same configuration, my cron-jobs sometimes do work and
> sometimes don't. In case of error I get this message:
>  
> *// 000002ad JobRunShell I org.quartz.core.JobRunShell run Job
> DEFAULT.quartz-endpoint15 threw a JobExecutionException:
> org.quartz.JobExecutionException: No
> CamelContext could be found with name: lab-import-context
> at
> org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:53)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
> at
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)//*
>   
>  
>  
> Both applications are using the same db-tables
> (qrtz_job_listeners,qrtz_trigger_listeners and so on..)
> The properties file looks like:
> *#============================================================================
>   
> # Configure Main Scheduler Properties
> #============================================================================ 
>  
>  
> org.quartz.scheduler.instanceName = MyClusteredScheduler
> # using instanceId= AUTO caused some errors when restarting app
> org.quartz.scheduler.instanceId = AUTO
>  
> #============================================================================ 
>  
> # Configure ThreadPool
> #============================================================================ 
>  
>  
> org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
> org.quartz.threadPool.threadCount = 2
> 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.jndiURL=java:comp/env/jdbc/DB
> *
>  
> Thanks for any help!
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/sometimes-CamelContext-not-found-on-websphere-cluster-tp5753466.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  

Reply via email to