Re: camel-quartz is misfiring on startup

2022-01-11 Thread Santiago Acosta
Thanks Claus! I had completely overlooked such simple ootb solutions!
However, our current solution is working quite well so we will not be
revisiting for the time being.

Thanks again. There is so much more to learn and test

On Tue, Jan 11, 2022 at 11:59 AM Claus Ibsen  wrote:

> Hi
>
> For quartz then one of its only benefits is its cron support.
> If you just want to trigger every X interval, then use camel-timer or
> camel-scheduler (latter more advanced).
>
> And for cron, there is in fact also camel-spring where they have cron
> support.
>
> On Tue, Jan 11, 2022 at 11:50 AM Santiago Acosta
>  wrote:
> >
> > Thanks for the info Karen, but I am sad to say we had to move on to use
> > something else (I think VertX which also has integrations with Camel).
> I'll
> > keep this close to the chest when the opportunity to use Camel+Quartz
> comes
> > around again.
> >
> > I'll keep an eye on https://issues.apache.org/jira/browse/CAMEL-17446
> >
> > On Thu, Jan 6, 2022 at 4:25 PM Karen Lease 
> wrote:
> >
> > > Hi Santiago,
> > >
> > > Sorry for the late reply, but it seems no one else picked up on this
> yet.
> > > I think the behavior you see is related to the time between the
> creation
> > > of the job trigger in Quartz and when Camel finishes initializing and
> > > the Quartz scheduler is actually started.
> > >
> > > The initial fire time of the trigger for your job is set to the time
> > > when the trigger is created, not when the Quartz scheduler is actually
> > > started.
> > > Based on your logs and the Camel Quartz code, the trigger is created
> > > between the following 2 log messages, so between 19:54:47,514 and
> 47,545.
> > >
> > >  > ...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
> > >  > scheduler version: 2.3.2
> > >  > ...:47,545 INFO  [main] o.a.c.c.quartz.QuartzEndpoint  - Job
> > >  > Camel_camel-1.resolver (triggerType=SimpleTriggerImpl,
> > >  > jobClass=StatefulCamelJob) is scheduled. Next fire date is Thu Dec
> 16
> > >  > 19:54:47 WET 2021
> > >
> > > Unfortunately the last message does not show the milliseconds in the
> > > start date, but we can see it is sometime in the second 19:54:47.
> > >
> > > It takes another 435 ms for Camel to finish its work and actually start
> > > the Quartz scheduler at 19:54:47,980:
> > >  > ...:47,979 INFO  [main] o.a.c.c.quartz.QuartzComponent -
> Starting
> > >  > scheduler.
> > >  > ...:47,980 INFO  [main] o.quartz.core.QuartzScheduler  -
> Scheduler
> > >  > DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> > >
> > > Quartz fires the first event as soon as possible since the start time
> > > has already passed:
> > >  > ...:48,027 INFO  [Worker-1] quartz-daemon  - QUARTZ
> > >
> > > Adding 1200 ms to the possible start time range, the second one should
> > > have fired between 19:54:48,714 and 48,745 and it is fired at 48,722.
> > >  > ...:48,722 INFO  [Worker-2] quartz-daemon  - QUARTZ
> > >
> > >
> > > Set the logging level to DEBUG on
> > > org.apache.camel.component.quartz.QuartzEndpoint to see more details
> > > about the trigger creation but the behavior seems consistent.
> > >
> > > Unfortunately, if I correctly understand the code, setting
> > > triggerStartDelay to a postive number to account for the delay in
> > > starting the scheduler does not appear to work, since it sets the start
> > > time of the trigger only if it is *less* than 0 which seems
> > > counter-intuitive.
> > >
> > > In QuartzEndpoint.createTrigger():
> > > if (getComponent().getScheduler().isStarted() || triggerStartDelay <
> 0) {
> > >  triggerBuilder.startAt(new Date(System.currentTimeMillis() +
> > > triggerStartDelay));
> > > }
> > >
> > > I hope this helps or at least explains the behavior.
> > > I created https://issues.apache.org/jira/browse/CAMEL-17446 related to
> > > the points I mentioned.
> > >
> > >
> > >
> > > On 16/12/2021 21:20, Santiago Acosta wrote:
> > > > Camel 3.13 (but I also tried 3.6 and results are worse)
> > > >
> > > > I have an issue where a quartz route is misfiring at the beginning
> of the
> > > > startup. I ran some standalone Quartz scheduler with a simple job and
> > > &g

Re: camel-quartz is misfiring on startup

2022-01-11 Thread Claus Ibsen
Hi

For quartz then one of its only benefits is its cron support.
If you just want to trigger every X interval, then use camel-timer or
camel-scheduler (latter more advanced).

And for cron, there is in fact also camel-spring where they have cron support.

On Tue, Jan 11, 2022 at 11:50 AM Santiago Acosta
 wrote:
>
> Thanks for the info Karen, but I am sad to say we had to move on to use
> something else (I think VertX which also has integrations with Camel). I'll
> keep this close to the chest when the opportunity to use Camel+Quartz comes
> around again.
>
> I'll keep an eye on https://issues.apache.org/jira/browse/CAMEL-17446
>
> On Thu, Jan 6, 2022 at 4:25 PM Karen Lease  wrote:
>
> > Hi Santiago,
> >
> > Sorry for the late reply, but it seems no one else picked up on this yet.
> > I think the behavior you see is related to the time between the creation
> > of the job trigger in Quartz and when Camel finishes initializing and
> > the Quartz scheduler is actually started.
> >
> > The initial fire time of the trigger for your job is set to the time
> > when the trigger is created, not when the Quartz scheduler is actually
> > started.
> > Based on your logs and the Camel Quartz code, the trigger is created
> > between the following 2 log messages, so between 19:54:47,514 and 47,545.
> >
> >  > ...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
> >  > scheduler version: 2.3.2
> >  > ...:47,545 INFO  [main] o.a.c.c.quartz.QuartzEndpoint  - Job
> >  > Camel_camel-1.resolver (triggerType=SimpleTriggerImpl,
> >  > jobClass=StatefulCamelJob) is scheduled. Next fire date is Thu Dec 16
> >  > 19:54:47 WET 2021
> >
> > Unfortunately the last message does not show the milliseconds in the
> > start date, but we can see it is sometime in the second 19:54:47.
> >
> > It takes another 435 ms for Camel to finish its work and actually start
> > the Quartz scheduler at 19:54:47,980:
> >  > ...:47,979 INFO  [main] o.a.c.c.quartz.QuartzComponent - Starting
> >  > scheduler.
> >  > ...:47,980 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
> >  > DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> >
> > Quartz fires the first event as soon as possible since the start time
> > has already passed:
> >  > ...:48,027 INFO  [Worker-1] quartz-daemon  - QUARTZ
> >
> > Adding 1200 ms to the possible start time range, the second one should
> > have fired between 19:54:48,714 and 48,745 and it is fired at 48,722.
> >  > ...:48,722 INFO  [Worker-2] quartz-daemon  - QUARTZ
> >
> >
> > Set the logging level to DEBUG on
> > org.apache.camel.component.quartz.QuartzEndpoint to see more details
> > about the trigger creation but the behavior seems consistent.
> >
> > Unfortunately, if I correctly understand the code, setting
> > triggerStartDelay to a postive number to account for the delay in
> > starting the scheduler does not appear to work, since it sets the start
> > time of the trigger only if it is *less* than 0 which seems
> > counter-intuitive.
> >
> > In QuartzEndpoint.createTrigger():
> > if (getComponent().getScheduler().isStarted() || triggerStartDelay < 0) {
> >  triggerBuilder.startAt(new Date(System.currentTimeMillis() +
> > triggerStartDelay));
> > }
> >
> > I hope this helps or at least explains the behavior.
> > I created https://issues.apache.org/jira/browse/CAMEL-17446 related to
> > the points I mentioned.
> >
> >
> >
> > On 16/12/2021 21:20, Santiago Acosta wrote:
> > > Camel 3.13 (but I also tried 3.6 and results are worse)
> > >
> > > I have an issue where a quartz route is misfiring at the beginning of the
> > > startup. I ran some standalone Quartz scheduler with a simple job and
> > > trigger and it works as expected, even with a small interval (<200ms).
> > >
> > > In the case of Camel, the interval is not being respected in the first
> > few
> > > exchanges.
> > >
> > > Notice at the end of the log how the first QUARTZ log entries are piled
> > > together (interval 1200). If I shorten the interval I can pile them up
> > even
> > > more (3 entries in 100ms with interval 200ms)
> > >
> >
> > > ...:47,318 INFO  [main] o.q.simpl.SimpleThreadPool - Job
> > execution
> > > threads will use class loader of thread: main
> > > ...:47,332 INFO  [main] o.q.core.SchedulerSignalerImpl - Initialized
> > > Scheduler Signaller o

Re: camel-quartz is misfiring on startup

2022-01-11 Thread Santiago Acosta
Thanks for the info Karen, but I am sad to say we had to move on to use
something else (I think VertX which also has integrations with Camel). I'll
keep this close to the chest when the opportunity to use Camel+Quartz comes
around again.

I'll keep an eye on https://issues.apache.org/jira/browse/CAMEL-17446

On Thu, Jan 6, 2022 at 4:25 PM Karen Lease  wrote:

> Hi Santiago,
>
> Sorry for the late reply, but it seems no one else picked up on this yet.
> I think the behavior you see is related to the time between the creation
> of the job trigger in Quartz and when Camel finishes initializing and
> the Quartz scheduler is actually started.
>
> The initial fire time of the trigger for your job is set to the time
> when the trigger is created, not when the Quartz scheduler is actually
> started.
> Based on your logs and the Camel Quartz code, the trigger is created
> between the following 2 log messages, so between 19:54:47,514 and 47,545.
>
>  > ...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
>  > scheduler version: 2.3.2
>  > ...:47,545 INFO  [main] o.a.c.c.quartz.QuartzEndpoint  - Job
>  > Camel_camel-1.resolver (triggerType=SimpleTriggerImpl,
>  > jobClass=StatefulCamelJob) is scheduled. Next fire date is Thu Dec 16
>  > 19:54:47 WET 2021
>
> Unfortunately the last message does not show the milliseconds in the
> start date, but we can see it is sometime in the second 19:54:47.
>
> It takes another 435 ms for Camel to finish its work and actually start
> the Quartz scheduler at 19:54:47,980:
>  > ...:47,979 INFO  [main] o.a.c.c.quartz.QuartzComponent - Starting
>  > scheduler.
>  > ...:47,980 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
>  > DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
>
> Quartz fires the first event as soon as possible since the start time
> has already passed:
>  > ...:48,027 INFO  [Worker-1] quartz-daemon  - QUARTZ
>
> Adding 1200 ms to the possible start time range, the second one should
> have fired between 19:54:48,714 and 48,745 and it is fired at 48,722.
>  > ...:48,722 INFO  [Worker-2] quartz-daemon  - QUARTZ
>
>
> Set the logging level to DEBUG on
> org.apache.camel.component.quartz.QuartzEndpoint to see more details
> about the trigger creation but the behavior seems consistent.
>
> Unfortunately, if I correctly understand the code, setting
> triggerStartDelay to a postive number to account for the delay in
> starting the scheduler does not appear to work, since it sets the start
> time of the trigger only if it is *less* than 0 which seems
> counter-intuitive.
>
> In QuartzEndpoint.createTrigger():
> if (getComponent().getScheduler().isStarted() || triggerStartDelay < 0) {
>  triggerBuilder.startAt(new Date(System.currentTimeMillis() +
> triggerStartDelay));
> }
>
> I hope this helps or at least explains the behavior.
> I created https://issues.apache.org/jira/browse/CAMEL-17446 related to
> the points I mentioned.
>
>
>
> On 16/12/2021 21:20, Santiago Acosta wrote:
> > Camel 3.13 (but I also tried 3.6 and results are worse)
> >
> > I have an issue where a quartz route is misfiring at the beginning of the
> > startup. I ran some standalone Quartz scheduler with a simple job and
> > trigger and it works as expected, even with a small interval (<200ms).
> >
> > In the case of Camel, the interval is not being respected in the first
> few
> > exchanges.
> >
> > Notice at the end of the log how the first QUARTZ log entries are piled
> > together (interval 1200). If I shorten the interval I can pile them up
> even
> > more (3 entries in 100ms with interval 200ms)
> >
>
> > ...:47,318 INFO  [main] o.q.simpl.SimpleThreadPool - Job
> execution
> > threads will use class loader of thread: main
> > ...:47,332 INFO  [main] o.q.core.SchedulerSignalerImpl - Initialized
> > Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
> > ...:47,333 INFO  [main] o.quartz.core.QuartzScheduler  - Quartz
> > Scheduler v.2.3.2 created.
> > ...:47,334 INFO  [main] org.quartz.simpl.RAMJobStore   - RAMJobStore
> > initialized.
> > ...:47,514 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
> > meta-data: Quartz Scheduler (v2.3.2) 'DefaultQuartzScheduler-camel-1'
> with
> > instanceId 'NON_CLUSTERED'
> >Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
> >NOT STARTED.
> >Currently in standby mode.
> >Number of jobs executed: 0
> >Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10
> threads.
> >Us

Re: camel-quartz is misfiring on startup

2022-01-06 Thread Karen Lease

Hi Santiago,

Sorry for the late reply, but it seems no one else picked up on this yet.
I think the behavior you see is related to the time between the creation 
of the job trigger in Quartz and when Camel finishes initializing and 
the Quartz scheduler is actually started.


The initial fire time of the trigger for your job is set to the time 
when the trigger is created, not when the Quartz scheduler is actually 
started.
Based on your logs and the Camel Quartz code, the trigger is created 
between the following 2 log messages, so between 19:54:47,514 and 47,545.


> ...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
> scheduler version: 2.3.2
> ...:47,545 INFO  [main] o.a.c.c.quartz.QuartzEndpoint  - Job
> Camel_camel-1.resolver (triggerType=SimpleTriggerImpl,
> jobClass=StatefulCamelJob) is scheduled. Next fire date is Thu Dec 16
> 19:54:47 WET 2021

Unfortunately the last message does not show the milliseconds in the 
start date, but we can see it is sometime in the second 19:54:47.


It takes another 435 ms for Camel to finish its work and actually start 
the Quartz scheduler at 19:54:47,980:

> ...:47,979 INFO  [main] o.a.c.c.quartz.QuartzComponent - Starting
> scheduler.
> ...:47,980 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
> DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.

Quartz fires the first event as soon as possible since the start time 
has already passed:

> ...:48,027 INFO  [Worker-1] quartz-daemon  - QUARTZ

Adding 1200 ms to the possible start time range, the second one should 
have fired between 19:54:48,714 and 48,745 and it is fired at 48,722.

> ...:48,722 INFO  [Worker-2] quartz-daemon  - QUARTZ


Set the logging level to DEBUG on 
org.apache.camel.component.quartz.QuartzEndpoint to see more details 
about the trigger creation but the behavior seems consistent.


Unfortunately, if I correctly understand the code, setting 
triggerStartDelay to a postive number to account for the delay in 
starting the scheduler does not appear to work, since it sets the start 
time of the trigger only if it is *less* than 0 which seems 
counter-intuitive.


In QuartzEndpoint.createTrigger():
if (getComponent().getScheduler().isStarted() || triggerStartDelay < 0) {
triggerBuilder.startAt(new Date(System.currentTimeMillis() + 
triggerStartDelay));

}

I hope this helps or at least explains the behavior.
I created https://issues.apache.org/jira/browse/CAMEL-17446 related to 
the points I mentioned.




On 16/12/2021 21:20, Santiago Acosta wrote:

Camel 3.13 (but I also tried 3.6 and results are worse)

I have an issue where a quartz route is misfiring at the beginning of the
startup. I ran some standalone Quartz scheduler with a simple job and
trigger and it works as expected, even with a small interval (<200ms).

In the case of Camel, the interval is not being respected in the first few
exchanges.

Notice at the end of the log how the first QUARTZ log entries are piled
together (interval 1200). If I shorten the interval I can pile them up even
more (3 entries in 100ms with interval 200ms)




...:47,318 INFO  [main] o.q.simpl.SimpleThreadPool - Job execution
threads will use class loader of thread: main
...:47,332 INFO  [main] o.q.core.SchedulerSignalerImpl - Initialized
Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
...:47,333 INFO  [main] o.quartz.core.QuartzScheduler  - Quartz
Scheduler v.2.3.2 created.
...:47,334 INFO  [main] org.quartz.simpl.RAMJobStore   - RAMJobStore
initialized.
...:47,514 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
meta-data: Quartz Scheduler (v2.3.2) 'DefaultQuartzScheduler-camel-1' with
instanceId 'NON_CLUSTERED'
   Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
   NOT STARTED.
   Currently in standby mode.
   Number of jobs executed: 0
   Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
   Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.

...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally
provided properties instance.
...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
scheduler version: 2.3.2
...:47,545 INFO  [main] o.a.c.c.quartz.QuartzEndpoint  - Job
Camel_camel-1.resolver (triggerType=SimpleTriggerImpl,
jobClass=StatefulCamelJob) is scheduled. Next fire date is Thu Dec 16
19:54:47 WET 2021



...:47,979 INFO  [main] o.a.c.c.quartz.QuartzComponent - Starting
scheduler.
...:47,980 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
...:47,993 INFO  [main] o.a.c.c.mock.MockEndpoint  - Asserting:
mock://end is satisfied
...:48,027 INFO  [Worker-1] quartz-daemon  - QUARTZ

camel-quartz is misfiring on startup

2021-12-16 Thread Santiago Acosta
Camel 3.13 (but I also tried 3.6 and results are worse)

I have an issue where a quartz route is misfiring at the beginning of the
startup. I ran some standalone Quartz scheduler with a simple job and
trigger and it works as expected, even with a small interval (<200ms).

In the case of Camel, the interval is not being respected in the first few
exchanges.

Notice at the end of the log how the first QUARTZ log entries are piled
together (interval 1200). If I shorten the interval I can pile them up even
more (3 entries in 100ms with interval 200ms)

...:46,750 INFO  [main] o.a.c.t.j.CamelTestSupport -

...:46,753 INFO  [main] o.a.c.t.j.CamelTestSupport - Testing: a()
(BlahTest)
...:46,755 INFO  [main] o.a.c.t.j.CamelTestSupport -

...:46,915 INFO  [main] .s.o.s.BlahTest$bootstrapper$1 - Run event
handler 1/1 for BEFORE_CONF
...:47,252 INFO  [main] o.a.c.i.e.AbstractCamelContext - MDC logging is
enabled on CamelContext: camel-1
...:47,253 INFO  [main] o.a.c.c.quartz.QuartzComponent - Create and
initializing scheduler.
...:47,254 INFO  [main] o.a.c.c.quartz.QuartzComponent - Setting
org.quartz.scheduler.jmx.export=true to ensure QuartzScheduler(s) will be
enlisted in JMX.
...:47,314 INFO  [main] o.q.impl.StdSchedulerFactory   - Using default
implementation for ThreadExecutor
...:47,318 INFO  [main] o.q.simpl.SimpleThreadPool - Job execution
threads will use class loader of thread: main
...:47,332 INFO  [main] o.q.core.SchedulerSignalerImpl - Initialized
Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
...:47,333 INFO  [main] o.quartz.core.QuartzScheduler  - Quartz
Scheduler v.2.3.2 created.
...:47,334 INFO  [main] org.quartz.simpl.RAMJobStore   - RAMJobStore
initialized.
...:47,514 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
meta-data: Quartz Scheduler (v2.3.2) 'DefaultQuartzScheduler-camel-1' with
instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.

...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally
provided properties instance.
...:47,514 INFO  [main] o.q.impl.StdSchedulerFactory   - Quartz
scheduler version: 2.3.2
...:47,545 INFO  [main] o.a.c.c.quartz.QuartzEndpoint  - Job
Camel_camel-1.resolver (triggerType=SimpleTriggerImpl,
jobClass=StatefulCamelJob) is scheduled. Next fire date is Thu Dec 16
19:54:47 WET 2021
...:47,977 INFO  [main] o.a.c.i.e.AbstractCamelContext - Routes startup
summary (total:2 started:2)
...:47,977 INFO  [main] o.a.c.i.e.AbstractCamelContext - Started
quartz-daemon (quartz://resolver)
...:47,977 INFO  [main] o.a.c.i.e.AbstractCamelContext - Started
route1 (seda://out)
...:47,977 INFO  [main] o.a.c.i.e.AbstractCamelContext - Apache Camel
3.13.0 (camel-1) started in 1s26ms (build:96ms init:205ms start:725ms)
...:47,979 INFO  [main] o.a.c.c.quartz.QuartzComponent - Starting
scheduler.
...:47,980 INFO  [main] o.quartz.core.QuartzScheduler  - Scheduler
DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
...:47,993 INFO  [main] o.a.c.c.mock.MockEndpoint  - Asserting:
mock://end is satisfied
...:48,027 INFO  [Worker-1] quartz-daemon  - QUARTZ
...:48,722 INFO  [Worker-2] quartz-daemon  - QUARTZ
...:49,923 INFO  [Worker-3] quartz-daemon  - QUARTZ
...:51,122 INFO  [Worker-4] quartz-daemon  - QUARTZ
...:52,321 INFO  [Worker-5] quartz-daemon  - QUARTZ
...:53,523 INFO  [Worker-6] quartz-daemon  - QUARTZ
...:54,526 INFO  [main] o.a.c.c.mock.MockEndpoint  - Re-asserting:
mock://end is satisfied after 1000 millis

The route I am using is incredibly simple


from("quartz:resolver?trigger.repeatInterval=1200=true=0")
.id("quartz-daemon")
.log("QUARTZ")
.process(processorName) // trivial, creates arrays with 2-3
random Int
.marshal()
.json(JsonLibrary.Jackson)
.to("mock:end")

Am I missing some specific Camel-Quartz configuration that would cause
these misfires?

I would like the scheduler to respect the interval, is this a Quartz issue?

Am I missing some specific misfire configuration that deals with these
cases?


Reg: Camel Quartz with Route Policy

2020-01-30 Thread jaffar hussain
Hi Team,

I am facing the issue where quartz doesn't start up. Is there anything
wrong with my below config?

I have also requirement where i have to suspend the job at specific time
and resume it again.

I have configured the policy using quartz as described in the link

https://camel.apache.org/manual/latest/cronscheduledroutepolicy.html

Any help or suggestions please?

http://camel.apache.org/schema/spring;>


 // exact names are hidden
due to security reasons


${in.header.id}


 // exact names are hidden due
to security reasons

 // exact names are
hidden due to security reasons






${in.header.id}























*Jboss Logs:*

29/01/20 14:13:38,701 INFO  [C3P0Registry] Initializing c3p0-0.9.5.2
[built 08-December-2015 22:06:04 -0800; debug? true; trace: 10] [main]
29/01/20 14:13:38,818 INFO  [SpringCamelContext] Apache Camel 2.19.1
(CamelContext: camel) is starting [main]
29/01/20 14:13:38,820 INFO  [ManagedManagementStrategy] JMX is enabled [main]
29/01/20 14:13:38,965 INFO  [DefaultTypeConverter] Loaded 196 type
converters [main]
29/01/20 14:13:39,018 INFO  [DefaultRuntimeEndpointRegistry] Runtime
endpoint registry is in extended mode gathering usage statistics of
all incoming and outgoing endpoints (cache limit: 1000) [main]
29/01/20 14:13:39,147 INFO  [QuartzComponent] Setting
org.quartz.scheduler.jmx.export=true to ensure QuartzScheduler(s) will
be enlisted in JMX. [main]
29/01/20 14:13:39,177 INFO  [StdSchedulerFactory] Using default
implementation for ThreadExecutor [main]
29/01/20 14:13:39,180 INFO  [SimpleThreadPool] Job execution threads
will use class loader of thread: main [main]
29/01/20 14:13:39,196 INFO  [SchedulerSignalerImpl] Initialized
Scheduler Signaller of type: class
org.quartz.core.SchedulerSignalerImpl [main]
29/01/20 14:13:39,196 INFO  [QuartzScheduler] Quartz Scheduler v.2.3.0
created. [main]
29/01/20 14:13:39,197 INFO  [RAMJobStore] RAMJobStore initialized. [main]
29/01/20 14:13:39,202 INFO  [QuartzScheduler] Scheduler meta-data:
Quartz Scheduler (v2.3.0) 'DefaultQuartzScheduler-camel' with
instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not
support persistence. and is not clustered.
 [main]
29/01/20 14:13:39,203 INFO  [StdSchedulerFactory] Quartz scheduler
'DefaultQuartzScheduler-camel' initialized from an externally provided
properties instance. [main]
29/01/20 14:13:39,203 INFO  [StdSchedulerFactory] Quartz scheduler
version: 2.3.0 [main]


-- 
Thanks & Regards ,
Jaffar Hussain


Re: Camel Quartz thread pool

2018-12-03 Thread Claus Ibsen
Hi

Can you maybe post more details, such as Camel version, and snippets
of your route setup etc. And maybe a bit more about what error happens
that you see that exscapes the thread pool, and maybe point to which
thread pool exactly. This may incline us to help faster and help look
into this.
On Tue, Nov 13, 2018 at 1:59 PM Narapureddy, Santi K
 wrote:
>
> Another Question on top of Camel Threadpools. Is there a way to monitor the 
> routes? This should help to keep a tab on the routes and get a notification 
> when anything happens. We have added onException block on Exception.class. By 
> looking at the thread dump, I can see that the pool is alive. But none of the 
> route is copying the files. So unable to trace what is happening. Any 
> suggestion is highly appreciated.
>
> Thanks
> Santi
>
> On 13/11/18, 4:55 PM, "Narapureddy, Santi K"  
> wrote:
>
> Hi
> I’m having a strange issue where the route is not polling and moving the 
> files at all. Want to understand the Quartz Scheduler’s Thread pool behavior. 
> If I understand correctly when a route is created with a schedule, it created 
> a thread pool with default number of thread (10). BY any chance if there is 
> any RunTimeException occurred in any of the thread, does it kill the whole 
> threadpool and none of the file copy happens after that.
>
> Thanks
> Santi
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity
> to which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.
>
>
>
> This e-mail, including attachments, may include confidential and/or
> proprietary information, and may be used only by the person or entity
> to which it is addressed. If the reader of this e-mail is not the intended
> recipient or his or her authorized agent, the reader is hereby notified
> that any dissemination, distribution or copying of this e-mail is
> prohibited. If you have received this e-mail in error, please notify the
> sender by replying to this message and delete this e-mail immediately.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Camel Quartz thread pool

2018-11-13 Thread Narapureddy, Santi K
Another Question on top of Camel Threadpools. Is there a way to monitor the 
routes? This should help to keep a tab on the routes and get a notification 
when anything happens. We have added onException block on Exception.class. By 
looking at the thread dump, I can see that the pool is alive. But none of the 
route is copying the files. So unable to trace what is happening. Any 
suggestion is highly appreciated.

Thanks
Santi

On 13/11/18, 4:55 PM, "Narapureddy, Santi K"  
wrote:

Hi
I’m having a strange issue where the route is not polling and moving the 
files at all. Want to understand the Quartz Scheduler’s Thread pool behavior. 
If I understand correctly when a route is created with a schedule, it created a 
thread pool with default number of thread (10). BY any chance if there is any 
RunTimeException occurred in any of the thread, does it kill the whole 
threadpool and none of the file copy happens after that.

Thanks
Santi

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.



This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


Camel Quartz thread pool

2018-11-13 Thread Narapureddy, Santi K
Hi
I’m having a strange issue where the route is not polling and moving the files 
at all. Want to understand the Quartz Scheduler’s Thread pool behavior. If I 
understand correctly when a route is created with a schedule, it created a 
thread pool with default number of thread (10). BY any chance if there is any 
RunTimeException occurred in any of the thread, does it kill the whole 
threadpool and none of the file copy happens after that.

Thanks
Santi

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


Camel Quartz Job not running properly

2016-12-21 Thread anilkumar311987
Hi I'm new to Apache Camel , trying to write one route to move files from one
location to other, I want to move the files only once for every five
minutes. If I move the files once again I need to wait for 5 minutes again
to move here is the code that I wrote:

public static void main(final String[] arguments) {
final CamelContext camelContext = new DefaultCamelContext();
try {
camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {

CronScheduledRoutePolicy policy= new 
CronScheduledRoutePolicy();
policy.setRouteStartTime("* */5 * * * 
?");

from("file:C:\\camel\\input")

.routeId("testRoute").routePolicy(policy)
.to("file:C:\\camel\\output");

}
});
camelContext.start();
Thread.sleep(5);

} catch (Exception camelException) {
}

but when I execute the code, it is moving the files for every 3 seconds,
trying to understand how it works, tried lot of options and fed up with
this, Can some one please help me, My requirement is it should move the
files once and wait for 5 minutes and them move again. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Job-not-running-properly-tp5791816.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz failed camel route creation when database is unreachable

2016-12-20 Thread Rachid KRAIEM
Hello,

Yes, it's my message

Cordialement,

*Rachid KRAIEM*




2016-12-20 17:45 GMT+01:00 Rachid KRAIEM [via Camel] <
ml-node+s465427n5791747...@n5.nabble.com>:

> Hi,
>
> Given the best practice is not to change the APIs, can you raise a JIRA
> that contain this solution and include him in the next release of
> camel-quartz ?
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-
> route-creation-when-database-is-unreachable-tp5789552p5791747.html
> To unsubscribe from camel-quartz failed camel route creation when database
> is unreachable, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=5789552=cmFjaGlka3JhaWVtQGdtYWlsLmNvbXw1Nzg5NTUyfC0xMDI3MzAyOTk=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552p5791749.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-quartz failed camel route creation when database is unreachable

2016-12-20 Thread Rachid KRAIEM
Hi,

Given the best practice is not to change the APIs, can you raise a JIRA that
contain this solution and include him in the next release of camel-quartz ?



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552p5791747.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz failed camel route creation when database is unreachable

2016-11-07 Thread Rachid KRAIEM
Thanks Claus,

Can you raise a JIRA that contain this solution ?



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552p5789852.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz failed camel route creation when database is unreachable

2016-11-07 Thread Claus Ibsen
> Trigger oldTrigger = null;
> //parameter added for check existing database connection
> boolean hasConn = true;
> try {
> oldTrigger = scheduler.getTrigger(getTriggerKey());
> } catch (org.quartz.JobPersistenceException e) {
> // catch Exception added by me, that permit to 
> continue
> // creating new CamelJob when database connection is 
> unreachable
> hasConn = false;
> LOG.error("Customized ERROR : " + e.getMessage() + " 
> : " + e.getCause());
> }
> boolean triggerExisted = oldTrigger != null;
> if (triggerExisted && !isRecoverableJob()) {
> ensureNoDupTriggerKey();
> }
>
> jobDetail = createJobDetail();
> Trigger trigger = createTrigger(jobDetail);
>
> QuartzHelper.updateJobDataMap(getCamelContext(), jobDetail,
> getEndpointUri(), isUsingFixedCamelContextName());
>
> if (triggerExisted) {
> // Reschedule job if trigger settings were changed
> if (hasTriggerChanged(oldTrigger, trigger)) {
> scheduler.rescheduleJob(getTriggerKey(), 
> trigger);
> }
> // condition added by me make job scheduling only when
> // database connection exist
> } else if (hasConn) {
> try {
> // Schedule it now. Remember that scheduler 
> might not be started
> // it, but we can schedule now.
> scheduler.scheduleJob(jobDetail, trigger);
> } catch (ObjectAlreadyExistsException ex) {
> // some other VM might may have stored the 
> job & trigger in DB
> // in clustered mode, in the mean time
> if (!(getComponent().isClustered())) {
> throw ex;
> } else {
> trigger = 
> scheduler.getTrigger(getTriggerKey());
> if (trigger == null) {
> throw new 
> SchedulerException("Trigger could not be found in quartz
> scheduler.");
> }
> }
> }
> }
>
> if (LOG.isInfoEnabled()) {
> LOG.info("Job {} (triggerType={}, jobClass={}) is 
> scheduled. Next fire
> date is {}", new Object[] { trigger.getKey(),
>     trigger.getClass().getSimpleName(),
> jobDetail.getJobClass().getSimpleName(), trigger.getNextFireTime() });
> }
>
> // Increase camel job count for this endpoint
> AtomicInteger number = (AtomicInteger)
> scheduler.getContext().get(QuartzConstants.QUARTZ_CAMEL_JOBS_COUNT);
> if (number != null) {
> number.incrementAndGet();
> }
>
> jobAdded.set(true);
> }
>
>
>
> *You confirm this proposal?*
>
> CustomQuartzComponent.java
> <http://camel.465427.n5.nabble.com/file/n5789552/CustomQuartzComponent.java>
>
> CustomQuartzEndpoint.java
> <http://camel.465427.n5.nabble.com/file/n5789552/CustomQuartzEndpoint.java>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: camel-quartz failed camel route creation when database is unreachable

2016-11-07 Thread souciance
I cannot comment on the code for starting the route when the database is
unavailable but why  not add some default properties to use when the
database is not available. Then you catch the exception and use those
properties instead.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552p5789827.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz failed camel route creation when database is unreachable

2016-11-07 Thread Rachid KRAIEM
Hi Everyone,

Can you validate this proposal



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552p5789822.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel-quartz failed camel route creation when database is unreachable

2016-11-01 Thread Rachid KRAIEM
// Schedule it now. Remember that scheduler 
might not be started
// it, but we can schedule now.
scheduler.scheduleJob(jobDetail, trigger);
} catch (ObjectAlreadyExistsException ex) {
// some other VM might may have stored the job 
& trigger in DB
// in clustered mode, in the mean time
if (!(getComponent().isClustered())) {
throw ex;
} else {
trigger = 
scheduler.getTrigger(getTriggerKey());
if (trigger == null) {
throw new 
SchedulerException("Trigger could not be found in quartz
scheduler.");
}
}
}
}

if (LOG.isInfoEnabled()) {
LOG.info("Job {} (triggerType={}, jobClass={}) is 
scheduled. Next fire
date is {}", new Object[] { trigger.getKey(),
trigger.getClass().getSimpleName(),
jobDetail.getJobClass().getSimpleName(), trigger.getNextFireTime() });
}

// Increase camel job count for this endpoint
AtomicInteger number = (AtomicInteger)
scheduler.getContext().get(QuartzConstants.QUARTZ_CAMEL_JOBS_COUNT);
if (number != null) {
number.incrementAndGet();
}

jobAdded.set(true);
}



*You confirm this proposal?*

CustomQuartzComponent.java
<http://camel.465427.n5.nabble.com/file/n5789552/CustomQuartzComponent.java>  

CustomQuartzEndpoint.java
<http://camel.465427.n5.nabble.com/file/n5789552/CustomQuartzEndpoint.java>  





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-failed-camel-route-creation-when-database-is-unreachable-tp5789552.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel quartz in cluster mode rewrite trigger

2016-06-24 Thread Anton Ram
Hello. I’m using camel quartz2 in cluster mode. Route starts from default 
quartz endpoint like :



StartUp issue in camel-quartz

2016-05-31 Thread Arghya
In my camel project all Route builder are getting executed by quartz
scheduler. The issue is when I am starting the camel context all of the
route builder is getting executed. 
My expectation is when I start the camel context all the route builders
should be ready for processing but execution will happen only on scheduled
time that measured by quartz scheduler. 

I found one autoStartup(false)option for one route, but here the route
builder is not getting started even if I start the camel context. 

[main] DefaultCamelContextINFO  Total 1 routes, of which 0 is
started. 

Thanks in advance, 
Arghya 



--
View this message in context: 
http://camel.465427.n5.nabble.com/StartUp-issue-in-camel-quartz-tp5783314.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel quartz - one scheduler used for a few QuartzComponent

2015-10-24 Thread marcin
Hi,

My application consist of a few osgi modules and is running on Karaf
environment. Each of those modules uses a camel-quartz component so for each
module is created a quartz's scheduler. In effect a lot of threads is
created becouse each scheduler consist of thread pool (default 10 threads)
and one scheduler's thread. 

I would like to have one osgi module that registers quartz's scheduler as a
service in osgi register and rest of modules that import scheduler from osgi
register and use it to configuration QuartzComponent (setScheduler(...)).
This solution works but problem is when module is refreshed -
QuartzComponent.doStop() method calls Scheduler.shutdown() method and
scheduler (common for each module) cannot be use. I have to restart my
application.

How can i solve this problem?

I use camel 2.15.0.

Best regards
Marcin



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-one-scheduler-used-for-a-few-QuartzComponent-tp5773038.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Quartz questions, probably simple

2015-09-23 Thread ZephroC
Hi,
   I'm trying to evaluate whether Camel Quartz meets our requirements so
this may be an obvious question.

So my aim is to have Camel Quartz read the job schedule from the JobStore,
in a cluster. Then have a web client write the schedules/triggers to the
JobStore. So have the creation of Jobs decoupled from the camel routes which
run the jobs.

I pictured the camel route would look something like quartz://group/myJob,
would go to the JobStore and look up the trigger. What is happening is that
it is writing a new Job trigger with that name and the default values
(simple job every second) to the JobStore.

Is it actually possible to get Camel Quartz to work this way around? Or
should I set up a scheduled job to add to a queue and just wire up the
cluster instances to read from the queue?

Apologies if this is very obvious.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-questions-probably-simple-tp5771856.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz memory leak

2015-08-13 Thread Akram
I have resolved the issue.. It is an issue with quartz component. Quartz was
being shutdown but the webapp didn't wait for quartz to finish before it
shutdown so Tomcat decided that it had left threads running and complained.
So, i override the shutdown method in quartzcomponent as follows and it
worked for me..

@Override
public void shutdown() throws SchedulerException, InterruptedException {
Scheduler scheduler = super.getScheduler();
if (scheduler != null) {
scheduler.shutdown(true);
Thread.sleep(1000);
scheduler = null;
}
}

Note the boolean argument to shutdown is the vital part. If you remove that
true to call the no-arg version or set it to false, your webapp won't wait
for quartz to shudown before it shuts down.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-memory-leak-tp5768063p5770634.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz memory leak

2015-08-13 Thread Greg Autric
Hi Akram,

feel free to rise a JIRA ticket (https://issues.apache.org/jira/browse/CAMEL)
And create an PR to github (https://github.com/apache/camel)

Camel commiters will analyse it, and accept it if it is confirmed issue.

thx for your help,

Greg AUTRIC
JBoss Middleware Consultant

email   : gautric __at__ redhat __dot__ com
twitter : @gautric_io

Red Hat Global Services
Red Hat France SARLsit: http://www.redhat.fr
Le Linea, 1 rue du General Leclerc, 92047 Paris La Défense Cedex
Sent from webmail

- Mail original -
De: Akram akram.s...@gmail.com
À: users@camel.apache.org
Envoyé: Mercredi 12 Août 2015 23:11:41
Objet: Re: Camel quartz memory leak

I have resolved the issue.. It is an issue with quartz component. Quartz was
being shutdown but the webapp didn't wait for quartz to finish before it
shutdown so Tomcat decided that it had left threads running and complained.
So, i override the shutdown method in quartzcomponent as follows and it
worked for me..

@Override
public void shutdown() throws SchedulerException, InterruptedException {
Scheduler scheduler = super.getScheduler();
if (scheduler != null) {
scheduler.shutdown(true);
Thread.sleep(1000);
scheduler = null;
}
}

Note the boolean argument to shutdown is the vital part. If you remove that
true to call the no-arg version or set it to false, your webapp won't wait
for quartz to shudown before it shuts down.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-memory-leak-tp5768063p5770634.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Is there any way to unschedule the Camel quartz job

2015-08-12 Thread Akram
Thanks for your replies. I am able to manage it by using mbeans in jmx.
Programatically getting mbeanserverconnection and stopping the cron route.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-there-any-way-to-unschedule-the-Camel-quartz-job-tp5767916p5770635.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz memory leak

2015-06-15 Thread Akram
I am using camel 2.15.1. Stopping the route using JMX, againg restarting it
using JMX. Also the same getting same error if I restart entire camel
context.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-memory-leak-tp5768063p5768275.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz memory leak

2015-06-15 Thread Willem Jiang
When you stop the route, the schedule won’t be shutdown.
But if you stop the camel context, the schedule will be shutdown if there is no 
CamelJob there.

Are there more than one camel-quartz endpoints in your camel route?

--  
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 June 15, 2015 at 10:36:57 PM, Akram (akram.s...@gmail.com) wrote:
 I am using camel 2.15.1. Stopping the route using JMX, againg restarting it
 using JMX. Also the same getting same error if I restart entire camel
 context.
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-quartz-memory-leak-tp5768063p5768275.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Camel quartz memory leak

2015-06-13 Thread Claus Ibsen
Hi

What version of Camel do you use? And how do you restart the route?

On Wed, Jun 10, 2015 at 11:33 AM, Akram akram.s...@gmail.com wrote:
 I am using camel quartz to run a job every minute. But whenever i restart the
 quartz route I get the message:

 appears to have started a thread named [MyScheduler_Worker-1] but has failed
 to stop it.This is very likely to create a memory leak. Stack trace of
 thread: java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
 Jun 10, 2015 10:01:03 AM org.apache.catalina.loader.WebappClassLoaderBase
 clearReferencesThreads



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-quartz-memory-leak-tp5768063.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Camel quartz memory leak

2015-06-10 Thread Akram
I am using camel quartz to run a job every minute. But whenever i restart the
quartz route I get the message:

appears to have started a thread named [MyScheduler_Worker-1] but has failed
to stop it.This is very likely to create a memory leak. Stack trace of
thread: java.lang.Object.wait(Native Method)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
Jun 10, 2015 10:01:03 AM org.apache.catalina.loader.WebappClassLoaderBase
clearReferencesThreads



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-memory-leak-tp5768063.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Is there any way to unschedule the Camel quartz job

2015-06-05 Thread Andrew Block
Take a look at the Control Bus [1] which provides the functionality to 
start/stop routes from another route.

- Andy

[1] - http://camel.apache.org/controlbus.html

-- 
Andrew Block


On June 5, 2015 at 11:41:24 AM, Akram (akram.s...@gmail.com) wrote:

I am triggering the quartz cron scheduler in one route. The requirement is to  
stop/remove the scheduled quartz job from another route. I have tried the  
below code but in vain.  
//Quartz route  
/from(quartz://myGroup/everyMinute?cron=0+0/1+*+*+*+?stateful=true)  
.to(stream:out)/  

//Another route to stop the quartz scheduler  
/from(restlet:/stopquartz?restletMethod=GET)  
.beanRef(processor, StopRoute)  
.to(stream:out);/  

//Stop Route method  
/public void stopRoute(Exchange exchange) throws Exception {  
CamelContext context = exchange.getContext();  
ServiceStatus status =  
context.getRouteStatus(exchange.getIn().getHeader(ROUTE_NAME).toString());  
if (!(status == ServiceStatus.Stopped || status ==  
ServiceStatus.Stopping)) {  
context.stopRoute(ROUTE_NAME);  
exchange.getOut().setBody(context.getRouteStatus(exchange.getIn().getHeader(ROUTE_NAME).toString()));
  
}else{  
exchange.getOut().setBody(ROUTE_NAME+ is already in stopped  
state);  

}  
}/  

Quartz route is not stopping and Scheduled job is still running.  



--  
View this message in context: 
http://camel.465427.n5.nabble.com/Is-there-any-way-to-unschedule-the-Camel-quartz-job-tp5767916.html
  
Sent from the Camel - Users mailing list archive at Nabble.com.  


Is there any way to unschedule the Camel quartz job

2015-06-05 Thread Akram
I am triggering the quartz cron scheduler in one route. The requirement is to
stop/remove the scheduled quartz job from another route. I have tried the
below code but in vain.
//Quartz route
/from(quartz://myGroup/everyMinute?cron=0+0/1+*+*+*+?stateful=true)
.to(stream:out)/

//Another route to stop the quartz scheduler
/from(restlet:/stopquartz?restletMethod=GET)
 .beanRef(processor, StopRoute)
 .to(stream:out);/

//Stop Route method
  /public void stopRoute(Exchange exchange) throws Exception {
CamelContext context = exchange.getContext();
ServiceStatus status =
context.getRouteStatus(exchange.getIn().getHeader(ROUTE_NAME).toString());
if (!(status == ServiceStatus.Stopped || status ==
ServiceStatus.Stopping)) {
context.stopRoute(ROUTE_NAME);
exchange.getOut().setBody(context.getRouteStatus(exchange.getIn().getHeader(ROUTE_NAME).toString()));
}else{
exchange.getOut().setBody(ROUTE_NAME+ is already in stopped
state);

}
}/

Quartz route is not stopping and Scheduled job is still running.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-there-any-way-to-unschedule-the-Camel-quartz-job-tp5767916.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Is there any way to unschedule the Camel quartz job

2015-06-05 Thread Ravindra Godbole
To use controlbus you need to identify/name your route. Your from
definition will look like this

from(quartz://myGroup/everyMinute?cron=0+0/1+*+*+*+?
stateful=true).routeId(stopThisRoute).
.to(stream:out)/

If you dont plan to use the controlbus, then in the current stopRoute
method you can stop the route with following lines.

context.stopRoute(stopThisRoute);




On Fri, Jun 5, 2015 at 11:02 PM, Andrew Block andy.bl...@gmail.com wrote:

 Take a look at the Control Bus [1] which provides the functionality to
 start/stop routes from another route.

 - Andy

 [1] - http://camel.apache.org/controlbus.html

 --
 Andrew Block


 On June 5, 2015 at 11:41:24 AM, Akram (akram.s...@gmail.com) wrote:

 I am triggering the quartz cron scheduler in one route. The requirement is
 to
 stop/remove the scheduled quartz job from another route. I have tried the
 below code but in vain.
 //Quartz route
 /from(quartz://myGroup/everyMinute?cron=0+0/1+*+*+*+?stateful=true)
 .to(stream:out)/

 //Another route to stop the quartz scheduler
 /from(restlet:/stopquartz?restletMethod=GET)
 .beanRef(processor, StopRoute)
 .to(stream:out);/

 //Stop Route method
 /public void stopRoute(Exchange exchange) throws Exception {
 CamelContext context = exchange.getContext();
 ServiceStatus status =
 context.getRouteStatus(exchange.getIn().getHeader(ROUTE_NAME).toString());
 if (!(status == ServiceStatus.Stopped || status ==
 ServiceStatus.Stopping)) {
 context.stopRoute(ROUTE_NAME);

 exchange.getOut().setBody(context.getRouteStatus(exchange.getIn().getHeader(ROUTE_NAME).toString()));
 }else{
 exchange.getOut().setBody(ROUTE_NAME+ is already in stopped
 state);

 }
 }/

 Quartz route is not stopping and Scheduled job is still running.



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Is-there-any-way-to-unschedule-the-Camel-quartz-job-tp5767916.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




-- 
- Ravi

*[ View My Youtube Channel
https://www.youtube.com/playlist?list=PL5Y_TlNjh0D59A4K3yQQR7gNAslnxDmRB
]*

Phone: +91 *98 509 760 91*


Re: How to set decrypted db password for camel quartz component

2015-03-23 Thread Willem Jiang
It should be easy to use EncryptableProperties[1] to decrypt the password and 
you can setup the properties instance to QuartzComponent directly.

[1]http://www.jasypt.org/encrypting-configuration.html

--  
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 March 23, 2015 at 3:07:36 PM, richardgroote (richard.gro...@gmail.com) wrote:
 Hello,
  
 I'am not sure if this is possible on the QuartzComponent by default. But you
 could override the quartzcomponent it self and override the method
 createSchedulerFactory.
  
 Kind regards,
  
 Richard
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/How-to-set-decrypted-db-password-for-camel-quartz-component-tp5764559p5764628.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: How to set decrypted db password for camel quartz component

2015-03-23 Thread richardgroote
Hello,

I'am not sure if this is possible on the QuartzComponent by default. But you
could override the quartzcomponent it self and override the method
createSchedulerFactory.

Kind regards,

Richard



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-set-decrypted-db-password-for-camel-quartz-component-tp5764559p5764628.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to set decrypted db password for camel quartz component

2015-03-22 Thread Nishantha Pradeep
Hi All

I am using camel quartz component with Oracle database to fetch and save
schedulers. My database username and password are in property file and that
property file is set for the component in following way,

bean id=quartz class=org.apache.camel.component.quartz.QuartzComponent
property name=properties
ref bean=job.properties/
/property/bean

The problem: Database password is encrypted and using above method, I can’t
set the decrypted password. Is there any way that I can set the decrypted
database password to the Quartz Component?

-Thanks

Nishantha


Re: Spring Camel Quartz cluster configuration

2015-01-29 Thread Willem Jiang
Hi,

org.springframework.scheduling.quartz.SchedulerFactoryBean is a FactoryBean, 
you can get the scheduler instance by calling the getObject() method.

you need to put the camel context instance into the schedulerContextAsMap.

--  
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 January 18, 2015 at 2:12:09 PM, Paul Dailly (pauldaill...@gmail.com) wrote:
 Hi there,
  
 I have a Spring application which defines Camel routes triggered using
 camel-quartz2 (v2.14.0). The Quartz Camel routes I have configured
 successfully trigger when I run a single instance of the app (i.e
 non-clustered, in-memory quartz scheduler).
  
 However, I now want to set this up in a clustered environment, where I can
 have multiple instances of my application and a single mySQL database to
 store the scheduled jobs for the Camel routes. I want only a single instance
 of my app to run when a triggered route fires. I started to follow this
 example
  
 from Camel's GitHub repo in order hook my Camel routes into my clustered
 Quartz scheduler. However I am confused by 2 parts of the bean declarations
 given in this example. The first source of confusion is the bean declaration
 below:
  
  class=org.apache.camel.component.quartz2.QuartzComponent
  
  
  
 The reference above to the scheduler bean is an instance of
 org.springframework.scheduling.quartz.SchedulerFactoryBean. However the
 QuartzComponent class's scheduler property is of type org.quartz.Scheduler.
 Therefore, I receive a ClassCastException when trying to set scheduler
 property to an instance of
 org.springframework.scheduling.quartz.SchedulerFactoryBean.
  
 My second source of confusion is the declaration of schedulerContextAsMap
 map shown below:
  
  
  
  
  value-ref=camelContext2/
  
  
  
 I am using Java configuration rather than XML for my bean declarations.
 Therefore, should I be setting the value of the
 CamelQuartzCamelContext-camelContext key to be an autowired instance of my
 CamelContext?
  
 I am new to Camel/Quartz so apologies if my question is difficult to reason
 about. Please let me know if you need me to provide any further information
 in order to clarify my issue.
  
 Thanks,
  
 Paul
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Spring-Camel-Quartz-cluster-configuration-tp5761825.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Spring Camel Quartz cluster configuration

2015-01-17 Thread Paul Dailly
Hi there,

I have a Spring application which defines Camel routes triggered using
camel-quartz2 (v2.14.0). The Quartz Camel routes I have configured
successfully trigger when I run a single instance of the app (i.e
non-clustered, in-memory quartz scheduler).

However, I now want to set this up in a clustered environment, where I can
have multiple instances of my application and a single mySQL database to
store the scheduled jobs for the Camel routes. I want only a single instance
of my app to run when a triggered route fires. I started to follow  this
example
https://github.com/apache/camel/blob/master/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzConsumerClusteredAppTwo.xml
  
from Camel's GitHub repo in order hook my Camel routes into my clustered
Quartz scheduler. However I am confused by 2 parts of the bean declarations
given in this example. The first source of confusion is the bean declaration
below:

bean id=quartz2
class=org.apache.camel.component.quartz2.QuartzComponent
property name=scheduler ref=scheduler/
  /bean

The reference above to the scheduler bean is an instance of
org.springframework.scheduling.quartz.SchedulerFactoryBean. However the
QuartzComponent class's scheduler property is of type org.quartz.Scheduler.
Therefore, I receive a ClassCastException when trying to set scheduler
property to an instance of
org.springframework.scheduling.quartz.SchedulerFactoryBean.

My second source of confusion is the declaration of schedulerContextAsMap
map shown below:

property name=schedulerContextAsMap
  
  map
entry key=CamelQuartzCamelContext-camelContext
value-ref=camelContext2/
  /map
/property

I am using Java configuration rather than XML for my bean declarations.
Therefore, should I be setting the value of the
CamelQuartzCamelContext-camelContext key to be an autowired instance of my
CamelContext?

I am new to Camel/Quartz so apologies if my question is difficult to reason
about. Please let me know if you need me to provide any further information
in order to clarify my issue.

Thanks,

Paul



--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-Camel-Quartz-cluster-configuration-tp5761825.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Null Pointer exception with camel quartz simple trigger (fireNow)

2014-05-30 Thread lakshmi.prashant
Hi Claus,Thanks for your prompt reply.   1)But what is surprising is that
there is no exception trace + the messages stay in processing state forever.
Also, we are not able to stop / undeploy the camel bundles. Also, I see in
QuartzEndpoint.java line no. 123, it logs an exception similar to what we
see in our logs: 
LOG.error(CamelExchangeException.createExceptionMessage(Error processing
exchange, exchange, e));  2)  When can this condition happen:  ‘Message
exchange stops but no MessageExchangeFailed event is thrown by Camel and our
messages stays in 'PROCESSING' state...  3) Also, this behaviour is not
consistent. In some VM's the routes complete and in some VM's, the messages
stay in processing status..Kindly advise.Thanks,Lakshmi
http://camel.465427.n5.nabble.com/file/n5751737/camel_NPE.png 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Null-Pointer-exception-with-camel-quartz-simple-trigger-fireNow-tp5751692p5751737.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Null Pointer exception with camel quartz simple trigger (fireNow)

2014-05-29 Thread lakshmi.prashant
Hi,

   We are using camel 2.12.3 distribution with quartz 1.8.6.
   We are repeatedly facing NullPointer issues with the quartz endpoint and
the route is failing at the beginning in the quartz endpoint.  After that
the message in the route doesn't complete at all.

We have faced this issue mainly with the run once immediately (fireNow)
simple trigger:

camel:from uri=quartz://TestNPETimerEventDefinition11?fireNow=true/


Error Message that we can find in the log is as follows:

ERROR#org.apache.camel.component.quartz.QuartzEndpoint##anonymous#DefaultQuartzScheduler-592-TestNPE_IFlow##Error
processing exchange. Exchange[Message: [Body is null]]. Caused by:
[java.lang.NullPointerException - while trying to invoke the method
java.io.InputStream.read(byte[]) of an object loaded from field
javax.crypto.CipherInputStream.input of an object loaded from local variable
'0']|

(or) sometimes we get the below error:

ERROR#org.apache.camel.component.quartz.QuartzEndpoint##anonymous#DefaultQuartzScheduler-
##Error processing exchange. Exchange[Message: [Body is null]]. 
Caused by: [java.lang.NullPointerException - while trying to invoke the
method java.lang.Object.toString() of an object returned from
java.util.Map$Entry.getValue()]|


In QuartzEndpoint.java, we see the error being thrown as follows. 

   
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.camel/camel-quartz/2.12.3/org/apache/camel/component/quartz/QuartzEndpoint.java?av=f


public void onJobExecute(final JobExecutionContext jobExecutionContext)
throws JobExecutionException {
100boolean run = true;
101LoadBalancer balancer = getLoadBalancer();
102if (balancer instanceof ServiceSupport) {
103run = ((ServiceSupport) balancer).isRunAllowed();
104}
105
106if (!run) {
107// quartz scheduler could potential trigger during a route
has been shutdown
108LOG.warn(Cannot execute Quartz Job with context:  +
jobExecutionContext +  because processor is not started:  + balancer);
109return;
110}
111
112LOG.debug(Firing Quartz Job with context: {},
jobExecutionContext);
113Exchange exchange = createExchange(jobExecutionContext);
114try {
115balancer.process(exchange);
116
117if (exchange.getException() != null) {
118// propagate the exception back to Quartz
119throw new JobExecutionException(exchange.getException());
120}
121} catch (Exception e) {
122// log the error
123*  LOG.error(CamelExchangeException.createExceptionMessage(Error
processing exchange, exchange, e));*124
125// and rethrow to let quartz handle it
126if (e instanceof JobExecutionException) {
127throw (JobExecutionException) e;
128}
129throw new JobExecutionException(e);
130}
131}
132


Can you please point me why the issue is happening and what we can do to fix
the issue?
Any help / pointers is greatly appreciated.

Many Thanks,
Lakshmi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Null-Pointer-exception-with-camel-quartz-simple-trigger-fireNow-tp5751692.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Null Pointer exception with camel quartz simple trigger (fireNow)

2014-05-29 Thread Claus Ibsen
Hi

Sounds like you have an exception being thrown during routing, and the
quartz component just logs that.

So either use an error handler to handle that exception. Or do not use
fireNow, but use a delay so quartz does not fire asap, but give a bit
of time for the other resources to be ready.



On Thu, May 29, 2014 at 10:14 AM, lakshmi.prashant
lakshmi.kala.venkate...@sap.com wrote:
 Hi,

We are using camel 2.12.3 distribution with quartz 1.8.6.
We are repeatedly facing NullPointer issues with the quartz endpoint and
 the route is failing at the beginning in the quartz endpoint.  After that
 the message in the route doesn't complete at all.

 We have faced this issue mainly with the run once immediately (fireNow)
 simple trigger:

 camel:from uri=quartz://TestNPETimerEventDefinition11?fireNow=true/


 Error Message that we can find in the log is as follows:

 ERROR#org.apache.camel.component.quartz.QuartzEndpoint##anonymous#DefaultQuartzScheduler-592-TestNPE_IFlow##Error
 processing exchange. Exchange[Message: [Body is null]]. Caused by:
 [java.lang.NullPointerException - while trying to invoke the method
 java.io.InputStream.read(byte[]) of an object loaded from field
 javax.crypto.CipherInputStream.input of an object loaded from local variable
 '0']|

 (or) sometimes we get the below error:

 ERROR#org.apache.camel.component.quartz.QuartzEndpoint##anonymous#DefaultQuartzScheduler-
 ##Error processing exchange. Exchange[Message: [Body is null]].
 Caused by: [java.lang.NullPointerException - while trying to invoke the
 method java.lang.Object.toString() of an object returned from
 java.util.Map$Entry.getValue()]|


 In QuartzEndpoint.java, we see the error being thrown as follows.


 http://grepcode.com/file/repo1.maven.org/maven2/org.apache.camel/camel-quartz/2.12.3/org/apache/camel/component/quartz/QuartzEndpoint.java?av=f


 public void onJobExecute(final JobExecutionContext jobExecutionContext)
 throws JobExecutionException {
 100boolean run = true;
 101LoadBalancer balancer = getLoadBalancer();
 102if (balancer instanceof ServiceSupport) {
 103run = ((ServiceSupport) balancer).isRunAllowed();
 104}
 105
 106if (!run) {
 107// quartz scheduler could potential trigger during a route
 has been shutdown
 108LOG.warn(Cannot execute Quartz Job with context:  +
 jobExecutionContext +  because processor is not started:  + balancer);
 109return;
 110}
 111
 112LOG.debug(Firing Quartz Job with context: {},
 jobExecutionContext);
 113Exchange exchange = createExchange(jobExecutionContext);
 114try {
 115balancer.process(exchange);
 116
 117if (exchange.getException() != null) {
 118// propagate the exception back to Quartz
 119throw new JobExecutionException(exchange.getException());
 120}
 121} catch (Exception e) {
 122// log the error
 123*  LOG.error(CamelExchangeException.createExceptionMessage(Error
 processing exchange, exchange, e));*124
 125// and rethrow to let quartz handle it
 126if (e instanceof JobExecutionException) {
 127throw (JobExecutionException) e;
 128}
 129throw new JobExecutionException(e);
 130}
 131}
 132


 Can you please point me why the issue is happening and what we can do to fix
 the issue?
 Any help / pointers is greatly appreciated.

 Many Thanks,
 Lakshmi



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Null-Pointer-exception-with-camel-quartz-simple-trigger-fireNow-tp5751692.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/


Re: Null Pointer exception with camel quartz simple trigger (fireNow)

2014-05-29 Thread lakshmi.prashant
Hi,
  Thanks for your reply - There is no stack trace and also, we are not able
to debug the issue, as it doesn't reach any of our components in the route. 

  I will look into this closely and follow your suggestion on delay.

Thanks,
Lakshmi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Null-Pointer-exception-with-camel-quartz-simple-trigger-fireNow-tp5751692p5751734.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Quartz in datasource cluster when Jobs added with no trigger must be durable.

2013-12-16 Thread xielei
If you get the exception:
org.quartz.SchedulerException: Jobs added with no trigger must be durable.

Add job.durability=true in endpoint url to resolve it. For example:
quartz2://examples/example?cron=0%2F10+*+*+*+*+%3FdeleteJob=falsejob.name=test1stateful=truejob.durability=true

Why it isn't mentioned in document? I found it in source code.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-in-datasource-cluster-when-Jobs-added-with-no-trigger-must-be-durable-tp5744830.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz misfires and route not getting run / triggered after exception:ObjectAlreadyExistsException

2013-11-13 Thread lakshmi.prashant
Hi,

   Can you kindly explain why the route starts failing after running for
sometime..
   Why is the doAddJob() getting called, after few runs of a schedule have
already tun, as reported in the exception? 
   The race condition can happen only at the start of the route, while
scheduling the quartz job. But it gets reported after few runs in the below
exception trace:

http://camel.465427.n5.nabble.com/file/n5743232/Route_Stoping_After_fewruns.png
 

Thanks,
Lakshmi

Exception Trace:
ERROR#org.apache.camel.blueprint.BlueprintCamelContext##anonymous#Blueprint
Extender: 3##avatarcl#aq4appaq4t#iflmap#null#null#
Error occurred during starting Camel: CamelContext(context4) due 
Unable to store Trigger with name: 'schedule3' and group: 'Camel', because
one already exists with this
identification.org.quartz.ObjectAlreadyExistsException: 
Unable to store Trigger with name: 'schedule3' and group: 'Camel', because
one already exists with this identification. at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1200)
 
at
org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:1072)
at
org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:3716)
 
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788)
at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90) 
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3712)
 
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1059)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:822) 
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) at
org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
 
at
org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:222)
at
org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:81)
 
at
org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:213)
at
org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
 
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
 
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2113)
 
at
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2049)
 
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1979)
 
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1758)
 
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1633)
 
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1500)
 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-misfires-and-route-not-getting-run-triggered-after-exception-ObjectAlreadyExistsExceptin-tp5739997p5743232.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz misfires and route not getting run / triggered after exception:ObjectAlreadyExistsException

2013-11-13 Thread Babak Vahdat
Hi

As you've already reported by your first post, only increasing the number of
running VM's makes this exception to happen (from 2 to 7). This CAN be a
hint for a race-condition somewhere. There was a similar problem being
reported while ago:

https://issues.apache.org/jira/browse/CAMEL-6686

The only reason why we could fix that was because we could reproduce the
same exception inside a test, which is now added to the code base of this
Camel module. In your case I was NOT able to do the same. If you could
somehow provide a test or a sample project then we could dig into this to
see if we can find the root cause of the problem and probably fix it.
There's also the following Camel test module you could make use of for this:

http://camel.apache.org/blueprint-testing.html

Babak


lakshmi.prashant wrote
 Hi,
 
Can you kindly explain why the route starts failing after running for
 sometime..
Why is the doAddJob() getting called, after few runs of a schedule have
 already tun, as reported in the exception? 
The race condition can happen only at the start of the route, while
 scheduling the quartz job. But it gets reported after few runs in the
 below exception trace:
http://camel.465427.n5.nabble.com/file/n5743232/Route_Stoping_After_fewruns.png
 
 
 Thanks,
 Lakshmi
 
 Exception Trace:
 ERROR#org.apache.camel.blueprint.BlueprintCamelContext##anonymous#Blueprint
 Extender: 3##avatarcl#aq4appaq4t#iflmap#null#null#
 Error occurred during starting Camel: CamelContext(context4) due 
 Unable to store Trigger with name: 'schedule3' and group: 'Camel', because
 one already exists with this
 identification.org.quartz.ObjectAlreadyExistsException: 
 Unable to store Trigger with name: 'schedule3' and group: 'Camel', because
 one already exists with this identification. at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1200)
  
 at
 org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:1072)
 at
 org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:3716)
  
 at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788)
 at
 org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90) 
 at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3712)
  
 at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1059)
 at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:822) 
 at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) at
 org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
  
 at
 org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:222)
 at
 org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:81)
  
 at
 org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:213)
 at
 org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
  
 at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
 at
 org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
  
 at
 org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2113)
  
 at
 org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2049)
  
 at
 org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1979)
  
 at
 org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1758)
  
 at
 org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1633)
  
 at
 org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1500)





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-misfires-and-route-not-getting-run-triggered-after-exception-ObjectAlreadyExistsExceptin-tp5739997p5743238.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz misfires and route not getting run / triggered after exception:ObjectAlreadyExistsException

2013-10-16 Thread Babak Vahdat
://camel.apache.org/schema/blueprint; 



 route
   
 from uri=quartz://schedule3?cron=0+0/1+0-23+*+*+?+* /
   
 process ref=mockProcessor /
   
   
 camel:to uri=file:data/outbox /
   
 /route
 /camelContext
 
 /blueprint





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-misfires-and-route-not-getting-run-triggered-after-exception-ObjectAlreadyExistsExceptin-tp5739997p5741637.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

2013-10-15 Thread steve.ardis
I'm not completely out of the woods getting this setup, but I'm past the
hurdle of the datasource lookup.  Here was my solution (note, replace xyz
as needed, and notice that I have isClustered set to false - this may
not be what you want):



This is inside of ServiceMix/Fuse.  Also, it is part of a Blueprint
configuration file, but don't think this should make a difference.  I
haven't tried this configuration inside of a quartz.properties file, but see
no reason it shouldn't work that way.

Hope it helps - 
Steve Ardis




--
View this message in context: 
http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400p5741631.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz misfires and route not getting run / triggered after exception:ObjectAlreadyExistsException

2013-10-15 Thread lakshmi.prashant
/blueprint/cxf;
xmlns:camel=http://camel.apache.org/schema/blueprint;
xsi:schemaLocation=http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd  
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd  
http://camel.apache.org/schema/blueprint/cxf
http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd  
http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd  
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd  
http://cxf.apache.org/ws/rm/manager
http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd  
http://schemas.xmlsoap.org/ws/2005/02/rm/policy
http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd  
http://cxf.apache.org/configuration/security
http://cxf.apache.org/schemas/configuration/security.xsd  
http://cxf.apache.org/blueprint/jaxws
http://cxf.apache.org/schemas/blueprint/jaxws.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd;


 
reference id=dataSource interface=javax.sql.DataSource
filter=(dataSourceName=default) /
bean id=stdSchedulerFactory 
class=org.quartz.impl.StdSchedulerFactory
argument  type=java.util.Properties 
props
prop
key=org.quartz.jobStore.classorg.quartz.impl.jdbcjobstore.JobStoreTX/prop
prop
key=org.quartz.dataSource.default.jndiURLosgi:service/javax.sql.DataSource/(dataSourceName=default)/prop
prop 
key=org.quartz.jobStore.dataSourcedefault/prop 
  
prop 
key=org.quartz.scheduler.instanceIdAUTO/prop
prop 
key=org.quartz.jobStore.misfireThreshold6/prop
prop
key=org.quartz.jobStore.classorg.quartz.impl.jdbcjobstore.JobStoreTX/prop
prop
key=org.quartz.jobStore.driverDelegateClassorg.quartz.impl.jdbcjobstore.StdJDBCDelegate/prop
prop 
key=org.quartz.dataSource.default.jndiAlwaysLookupfalse/prop   
  
prop 
key=org.quartz.scheduler.skipUpdateChecktrue/prop
prop 
key=org.quartz.jobStore.isClusteredtrue/prop
prop
key=org.quartz.threadPool.classorg.quartz.simpl.SimpleThreadPool/prop
prop 
key=org.quartz.threadPool.threadCount50/prop
prop
key=org.quartz.plugin.triggHistory.classorg.quartz.plugins.history.LoggingTriggerHistoryPlugin
/prop
prop 
key=org.quartz.plugin.triggHistory.triggerFiredMessageTrigger
{1}.{0} fired job {6}.{5} at {4,date,-MM-dd HH:mm:ss} /prop
prop
key=org.quartz.plugin.triggHistory.triggerCompleteMessageTrigger {1}.{0}
completed firing job {6}.{5} at
{4,date, -MM-dd HH:mm:ss} with 
resulting trigger instructioncode
{9}
/prop 
/props
/argument
/bean 
bean id=quartz
class=org.apache.camel.component.quartz.QuartzComponent
property name=factory ref=stdSchedulerFactory/
   /bean  
   bean id=mockProcessor class=com.sap.test.route.TestProcessor /



   camelContext id=context4
xmlns=http://camel.apache.org/schema/blueprint; 
 
 route
from uri=quartz://schedule3?cron=0+0/1+0-23+*+*+?+* 
/
process ref=mockProcessor / 
camel:to uri=file:data/outbox /
/route
/camelContext



/blueprint



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-misfires-and-route-not-getting-run-triggered-after-exception-ObjectAlreadyExistsExceptin-tp5739997p5741632.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz misfires and route not getting run / triggered after exception:ObjectAlreadyExistsException

2013-09-28 Thread Babak Vahdat
Hi

Were you able to find the root cause of the problem here? If not:

- Which exact Quartz 1.x version do you make use of?
- Can you reproduce this with the latest Camel 2.12.1 version?
- And CAMEL-5994 is already fixed so this should not cause any problem for
you
- Also looking at the stacktrace I think Quartz has not been setup properly
in Cluster-Mode (see
org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
on the call-stack)... Did you set the org.quartz.jobStore.isClustered and
org.quartz.jobStore.clusterCheckinInterval properties appropriately?
- As you run inside OSGi but assign the id of camelContext by yourself
(e.g. context4), have you seen the blue-box about this here
http://camel.apache.org/quartz

Babak


lakshmi.prashant wrote
 Hi,
 
   I am running camel quartz (2.10.4)  quartz has been set-up in clustered
 mode. The clocks in the cluster are synchronized.
 
   I have set-up a trigger to run every 1 minute, via the camel-quartz
 end-point in my route.
 
   a) it works fine if quartz is not set up in clustered mode (uses
 RAMJobstore).
 
   b) If quartz is set up in clustred mode, it was working fine when there
 were only 2 nodes in the cluster.
   Sometimes, instead of every 1 minute, the runs used to get fired
 every 2 minutes over a time-window, but it seemed to stabilize and run
 fine.
 
   c) After I increased the number of VM's in the cluster (to ~7 VM's), I
 faced misfires..
  
  i) The routes used to be triggered correctly for sometime and then
 stop working altogether..
  ii) The below exception has been logged in 1 (or) more VM's in the
 cluster, after which  the camel endpoints seemed to not fire at all. PFA
 the depiction of misfires from camel.
 
 Note: This issue is noticed in 2.11 camel as well. Is this related to
 https://issues.apache.org/jira/browse/CAMEL-5994... And has this not been
 fixed till now?
 
 Kindly help.
 
 Thanks,
 Lakshmi
 
 Exception Trace:
 
 ERROR#org.apache.camel.blueprint.BlueprintCamelContext##anonymous#Blueprint
 Extender: 3##avatarcl#aq4appaq4t#iflmap#null#null#Error occurred during
 starting Camel: CamelContext(context4) due Unable to store Trigger with
 name: 'schedule3' and group: 'Camel', because one already exists with this
 identification.org.quartz.ObjectAlreadyExistsException: Unable to store
 Trigger with name: 'schedule3' and group: 'Camel', because one already
 exists with this identification.
 at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1200)
   at
 org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:1072)
   at
 org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:3716)
   at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788)
   at
 org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90)
   at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3712)
   at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1059)
   at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:822)
   at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243)
   at
 org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
   at
 org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:222)
   at
 org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:81)
   at
 org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:213)
   at
 org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
   at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
   at
 org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
   at
 org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2113)
   at
 org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2049)
   at
 org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1979)
   at
 org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1758)
   at
 org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1633)
   at
 org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1500)
 
   
http://camel.465427.n5.nabble.com/file/n5739997/FailedRuns.jpg 
http://camel.465427.n5.nabble.com/file/n5739997/runs_successful_with_2_VMs.jpg
 
http://camel.465427.n5.nabble.com/file/n5739997/some_runs_misfiring_fire_in_2_mins.jpg
 




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-misfires-and-route-not-getting-run-triggered-after-exception-ObjectAlreadyExistsExceptin-tp5739997p5740345.html
Sent

Re: Camel Quartz Query

2013-09-26 Thread Taariq Levack
Hi

Can you use an idempotent consumer[1] before sending to the web service?
http://camel.apache.org/idempotent-consumer.html

If you did have a sort of 'busy' status, you'd have to handle the situation
where records are left in that 'busy' state due to a JVM crash for example.

Taariq


On Wed, Sep 25, 2013 at 5:20 PM, gilboy josephoto...@gmail.com wrote:

 Hi

 I have a quartz job(stateful) which wakes up every 60 seconds, pulls
 unprocessed records from a DB and sends each of them to a Web Service
 Endpoint. The Web Service call introduces a latency of approx .5 sec. Each
 time the quartz job fires there can be 100's of unprocessed records.
 Hence, after retrieving the records I iterate over the records via the
 splitter and I load balance(sticky - need to maintain order across subsets
 of the records) to 10 different seda queues. I then have 10 different
 routes
 which takes from each of the queues, transmits the message to the web
 service endpoint and then updates the record to be in a processed state.

 However, with the above approach I could easily send duplicates to the web
 service endpoint because a record which is returned when the quartz job
 fires at time 0 could be sitting on one of the seda queues at time 60 when
 the quartz job fires again and hence it is still in an unprocessed state
 in the database as it only gets updated to processed when we get a
 response from the Web Service call.

 I could solve this by introducing a new interim status and have the DB
 update the unprocessed records to the new interim status but just wanted
 to check to see if there was any other way of solving this as I have less
 control over the DB

 Thanks
 Joe



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-Quartz-Query-tp5740206.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel Quartz Query

2013-09-26 Thread Christian Posta
+1 idempotent consumer. that should work nicely.


On Wed, Sep 25, 2013 at 10:59 PM, Taariq Levack taar...@gmail.com wrote:

 Hi

 Can you use an idempotent consumer[1] before sending to the web service?
 http://camel.apache.org/idempotent-consumer.html

 If you did have a sort of 'busy' status, you'd have to handle the situation
 where records are left in that 'busy' state due to a JVM crash for example.

 Taariq


 On Wed, Sep 25, 2013 at 5:20 PM, gilboy josephoto...@gmail.com wrote:

  Hi
 
  I have a quartz job(stateful) which wakes up every 60 seconds, pulls
  unprocessed records from a DB and sends each of them to a Web Service
  Endpoint. The Web Service call introduces a latency of approx .5 sec.
 Each
  time the quartz job fires there can be 100's of unprocessed records.
  Hence, after retrieving the records I iterate over the records via the
  splitter and I load balance(sticky - need to maintain order across
 subsets
  of the records) to 10 different seda queues. I then have 10 different
  routes
  which takes from each of the queues, transmits the message to the web
  service endpoint and then updates the record to be in a processed
 state.
 
  However, with the above approach I could easily send duplicates to the
 web
  service endpoint because a record which is returned when the quartz job
  fires at time 0 could be sitting on one of the seda queues at time 60
 when
  the quartz job fires again and hence it is still in an unprocessed
 state
  in the database as it only gets updated to processed when we get a
  response from the Web Service call.
 
  I could solve this by introducing a new interim status and have the DB
  update the unprocessed records to the new interim status but just
 wanted
  to check to see if there was any other way of solving this as I have less
  control over the DB
 
  Thanks
  Joe
 
 
 
  --
  View this message in context:
  http://camel.465427.n5.nabble.com/Camel-Quartz-Query-tp5740206.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 




-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta


Camel Quartz Query

2013-09-25 Thread gilboy
Hi 

I have a quartz job(stateful) which wakes up every 60 seconds, pulls
unprocessed records from a DB and sends each of them to a Web Service
Endpoint. The Web Service call introduces a latency of approx .5 sec. Each
time the quartz job fires there can be 100's of unprocessed records.
Hence, after retrieving the records I iterate over the records via the
splitter and I load balance(sticky - need to maintain order across subsets
of the records) to 10 different seda queues. I then have 10 different routes
which takes from each of the queues, transmits the message to the web
service endpoint and then updates the record to be in a processed state.

However, with the above approach I could easily send duplicates to the web
service endpoint because a record which is returned when the quartz job
fires at time 0 could be sitting on one of the seda queues at time 60 when
the quartz job fires again and hence it is still in an unprocessed state
in the database as it only gets updated to processed when we get a
response from the Web Service call.

I could solve this by introducing a new interim status and have the DB
update the unprocessed records to the new interim status but just wanted
to check to see if there was any other way of solving this as I have less
control over the DB

Thanks
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Query-tp5740206.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel quartz misfires and route not getting run / triggered after exception:ObjectAlreadyExistsException

2013-09-22 Thread lakshmi.prashant
Hi,  I am running camel quartz (2.10.4)  quartz has been set-up in clustered
mode. The clocks in the cluster are synchronized.  I have set-up a trigger
to run every 1 minute, via the camel-quartz end-point in my route.  a) it
works fine if quartz is not set up in clustered mode (uses RAMJobstore).  b)
If quartz is set up in clustred mode, it was working fine when there were
only 2 nodes in the cluster.  Sometimes, instead of every 1 minute, the
runs used to get fired every 2 minutes over a time-window, but it seemed to
stabilize and run fine.  c) After I increased the number of VM's in the
cluster (to ~7 VM's), I faced misfires..  i) The routes used to be
triggered correctly for sometime and then stop working altogether.. ii)
The below exception has been logged in 1 (or) more VM's in the cluster,
after which  the camel endpoints seemed to not fire at all. PFA the
depiction of misfires from camel.Note: This issue is noticed in 2.11 camel
as well. Is this related to
https://issues.apache.org/jira/browse/CAMEL-5994... And has this not been
fixed till now?Kindly help.Thanks,LakshmiException
Trace:ERROR#org.apache.camel.blueprint.BlueprintCamelContext##anonymous#Blueprint
Extender: 3##avatarcl#aq4appaq4t#iflmap#null#null#Error occurred during
starting Camel: CamelContext(context4) due Unable to store Trigger with
name: 'schedule3' and group: 'Camel', because one already exists with this
identification.org.quartz.ObjectAlreadyExistsException: Unable to store
Trigger with name: 'schedule3' and group: 'Camel', because one already
exists with this identification.at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1200)
at
org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:1072)
at
org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:3716)
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788)
at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90)
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3712)
at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1059)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:822)
at
org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) at
org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:232)
at
org.apache.camel.component.quartz.QuartzComponent.addJob(QuartzComponent.java:222)
at
org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:81)
at
org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:213)
at
org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2113)
at
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:2049)
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1979)
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1758)
at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1633)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1500)
  
http://camel.465427.n5.nabble.com/file/n5739997/FailedRuns.jpg 
http://camel.465427.n5.nabble.com/file/n5739997/runs_successful_with_2_VMs.jpg
 
http://camel.465427.n5.nabble.com/file/n5739997/some_runs_misfiring_fire_in_2_mins.jpg
 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-misfires-and-route-not-getting-run-triggered-after-exception-ObjectAlreadyExistsExceptin-tp5739997.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

2013-09-03 Thread Claus Ibsen
Hi

As its Quartz which does the DataSource lookup then wonder how it does
the lookup?
Though I assume spring users with quartz may have defined their data
sources as spring bean.
So maybe you can find some information how to tell quartz to lookup in
spring etc. Then spring-dm in OSGi ought to work with it.

There is also a new camel-quartz2 component in Camel 2.12. Maybe
quartz2 would work better with OSGi ?

On Sun, Sep 1, 2013 at 1:03 PM, lakshmi.prashant
lakshmi.kala.venkate...@sap.com wrote:
 Hi,

  I have already referred to the datasource (OSGI service) in the beans.xml:

  reference id=dataSource interface=javax.sql.DataSource
 filter=(dataSourceName=default) /

 a) And I had already tried referring to the datasource using the reference
 id, in quartz properties:

   bean id=quartz
 class=org.apache.camel.component.quartz.QuartzComponent
 property name=propertiesprops
  prop
 key=org.quartz.jobStore.dataSource*dataSource*/prop
   /props/properties
  /bean

 b) Also, I had earlier tried to refer the datasource by the osgi service
 name..

bean id=quartz
 class=org.apache.camel.component.quartz.QuartzComponent
 property name=propertiesprops
  prop
 key=org.quartz.jobStore.dataSource*default*/prop
   /props/properties
  /bean


 None of the 3 approached had worked.

 Exception trace while referring to bean reference id.


 Failed to obtain DB connection from data source 'dataSource':
 java.sql.SQLException: There is no DataSource named 'dataSource'
 org.quartz.JobPersistenceException: Failed to obtain DB connection from data
 source 'dataSource': java.sql.SQLException: There is no DataSource named
 'dataSource' [See nested exception: java.sql.SQLException: There is no
 DataSource named 'dataSource']

 Thanks,
 Lakshmi



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400p5738423.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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


Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

2013-09-01 Thread Claus Ibsen
You should likely reference the service in your xml file

Then from Quartz point of view its just a regular bean id you refer
to, and not all the osgi filter syntax which it does not understand.

See the spring-dm docs about service registry references
And possible at Karaf / ServiceMix docs as they are OSGi based.



On Sat, Aug 31, 2013 at 5:20 PM, lakshmi.prashant
lakshmi.kala.venkate...@sap.com wrote:
 Hi,

 I am trying to set up quartz in clustered mode to work with camel quartz in
 my camel route.

 (i.e) we have deployed the bundle with the camel route having camel quartz
 endpoint, in all the cluster nodes. But I would like to have my camel route
 triggered only in one of the nodes in the cluster at the scheduled time  I
 am hoping that if the camel quartz refers to quartz in clustered mode, then
 the trigger will reach the camel route in only one node.

 The datasources are available as OSGI services in the cluster. But I need to
 configure the data source by its name (JNDI name) in the quartz properties
 of the QuartzComponent  I am getting a missing datsasource exception. Pls.
 find attached the spring xml with the camel route   beans.xml
 http://camel.465427.n5.nabble.com/file/n5738400/beans.xml

 Any suggestions to make this work are welcome. Kindly help.

 Thanks,
 Lakshmi


 Code snippet used for clustering:
 bean id=quartz class=org.apache.camel.component.quartz.QuartzComponent
 property name=properties
 props
   prop
 key=dataSourceosgi:service/javax.sql.DataSource/(dataSourceName=default)/prop
   prop key=org.quartz.jobStore.dataSource
 osgi:service/javax.sql.DataSource/(dataSourceName=default)/lt;/prop
 …
 /props
 /property
 /bean



 Exception trace: org.quartz.JobPersistenceException: Failed to obtain DB
 connection from data source 'default': java.sql.SQLException: There is no
 DataSource named
 'osgi:service/javax.sql.DataSource/(dataSourceName=default)'[See nested
 exception: java.sql.SQLException: There is no DataSource named 'default']
at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:715)
at
 org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:69)
at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3785)
at
 org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90)
at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3693)
at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1561)
at
 org.quartz.core.QuartzScheduler.getTrigger(QuartzScheduler.java:1448)
at org.quartz.impl.StdScheduler.getTrigger(StdScheduler.java:551)
 Caused by: java.sql.SQLException: There is no DataSource named
 'osgi:service/javax.sql.DataSource/(dataSourceName=default)'
at
 org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:105)
at
 org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:712)


 org.quartz.JobPersistenceException: Failed to obtain DB connection from data
 source 'jdbc/DefaultDB': java.sql.SQLException: There is no DataSource named
 'jdbc/DefaultDB' [See nested exception: java.sql.SQLException: There is no
 DataSource named 'jdbc/DefaultDB']





 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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


Re: Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

2013-09-01 Thread lakshmi.prashant
Hi,

 I have already referred to the datasource (OSGI service) in the beans.xml:

 reference id=dataSource interface=javax.sql.DataSource
filter=(dataSourceName=default) /

a) And I had already tried referring to the datasource using the reference
id, in quartz properties:

  bean id=quartz
class=org.apache.camel.component.quartz.QuartzComponent
property name=propertiesprops
 prop
key=org.quartz.jobStore.dataSource*dataSource*/prop
  /props/properties
 /bean

b) Also, I had earlier tried to refer the datasource by the osgi service
name..

   bean id=quartz
class=org.apache.camel.component.quartz.QuartzComponent
property name=propertiesprops
 prop
key=org.quartz.jobStore.dataSource*default*/prop
  /props/properties
 /bean


None of the 3 approached had worked.

Exception trace while referring to bean reference id.


Failed to obtain DB connection from data source 'dataSource':
java.sql.SQLException: There is no DataSource named 'dataSource'
org.quartz.JobPersistenceException: Failed to obtain DB connection from data
source 'dataSource': java.sql.SQLException: There is no DataSource named
'dataSource' [See nested exception: java.sql.SQLException: There is no
DataSource named 'dataSource']

Thanks,
Lakshmi



--
View this message in context: 
http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400p5738423.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Missing datasource exception while referring to OSGI datasource for clustering quartz with camel-quartz

2013-08-31 Thread lakshmi.prashant
Hi,

I am trying to set up quartz in clustered mode to work with camel quartz in
my camel route.

(i.e) we have deployed the bundle with the camel route having camel quartz
endpoint, in all the cluster nodes. But I would like to have my camel route
triggered only in one of the nodes in the cluster at the scheduled time  I
am hoping that if the camel quartz refers to quartz in clustered mode, then
the trigger will reach the camel route in only one node.

The datasources are available as OSGI services in the cluster. But I need to
configure the data source by its name (JNDI name) in the quartz properties
of the QuartzComponent  I am getting a missing datsasource exception. Pls.
find attached the spring xml with the camel route   beans.xml
http://camel.465427.n5.nabble.com/file/n5738400/beans.xml  

Any suggestions to make this work are welcome. Kindly help.

Thanks,
Lakshmi


Code snippet used for clustering:
bean id=quartz class=org.apache.camel.component.quartz.QuartzComponent
property name=properties
props
  prop
key=dataSourceosgi:service/javax.sql.DataSource/(dataSourceName=default)/prop
 
  prop key=org.quartz.jobStore.dataSource
osgi:service/javax.sql.DataSource/(dataSourceName=default)/lt;/prop
…
/props
/property
/bean



Exception trace: org.quartz.JobPersistenceException: Failed to obtain DB
connection from data source 'default': java.sql.SQLException: There is no
DataSource named
'osgi:service/javax.sql.DataSource/(dataSourceName=default)'[See nested
exception: java.sql.SQLException: There is no DataSource named 'default']
   at
org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:715)
   at
org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:69)
   at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3785)
   at
org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:90)
   at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3693)
   at
org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1561)
   at
org.quartz.core.QuartzScheduler.getTrigger(QuartzScheduler.java:1448)
   at org.quartz.impl.StdScheduler.getTrigger(StdScheduler.java:551)
Caused by: java.sql.SQLException: There is no DataSource named
'osgi:service/javax.sql.DataSource/(dataSourceName=default)'
   at
org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:105)
   at
org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:712)


org.quartz.JobPersistenceException: Failed to obtain DB connection from data
source 'jdbc/DefaultDB': java.sql.SQLException: There is no DataSource named
'jdbc/DefaultDB' [See nested exception: java.sql.SQLException: There is no
DataSource named 'jdbc/DefaultDB']





--
View this message in context: 
http://camel.465427.n5.nabble.com/Missing-datasource-exception-while-referring-to-OSGI-datasource-for-clustering-quartz-with-camel-quaz-tp5738400.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz and support for quartz 2.x

2013-08-12 Thread Claus Ibsen
Camel 2.12 will include a camel-quartz2 component
http://camel.apache.org/quartz2

On Mon, Aug 12, 2013 at 9:14 AM, ravishankar.singaram
bytes2r...@gmail.com wrote:
 Hi Patrick,

 Did you find any luck in implementing Quartz 2.x for Camel?

 Note: We are trying to employ Quartz for enabling multi-node clustering for
 our camel routes. There was some issues while using the default Quartz
 version, we felt should upgrade to the latest Quartz version.



 -
 Ravishankar Singaram
 Technical Lead
 Amadeus Software Labs
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5737113.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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


Re: camel-quartz and support for quartz 2.x

2013-05-29 Thread Claus Ibsen
No Camel 2.11 will NOT support Quartz 2.x. One of the reason is Spring
3.0.x does not support Quartz 2.x, and Camel 2.11 is spring 3.0
compatible.

Camel 2.12 will be updated to Quartz 2.x as we dropped support for
Spring 3.0 in this release.

For Camel 2.11 you may manually try to upgrade quartz to 2.x if you
are not using spring or using spring 3.1 or better. Though not sure if
you hit any issue in doing so.

On Thu, May 30, 2013 at 7:36 AM, Patrick Bray patrick.b...@gmail.com wrote:
 Hi All,

 Can you please confirm whether or not Camel v2.11.0 supports Quartz v2.x?

 Checking JIRA I can see the following ticket is unresolved:

 https://issues.apache.org/jira/browse/CAMEL-4075

 If not can you adivse whether or not this is on the road map for Camel
 2.11.1?

 The issue we have is that we intend to have multiple application components
 deployed that utilise a Clustered Quartz JDBC job store.

 From what I understand Quartz 1.8.x does not allow multiple logical
 schedulers to share the same job store where as 2.x does (see
 http://forums.terracotta.org/forums/posts/list/5562.page).

 Thanks,
 Patrick Bray



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5733444.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


RE: camel-quartz and support for quartz 2.x

2013-05-29 Thread Bray, Patrick
Ok excellent thanks for the clarification Claus as we are using Spring
v3.1.3 I will try manually updating and post back with my results.

-Original Message-
From: Claus Ibsen [mailto:claus.ib...@gmail.com] 
Sent: Thursday, 30 May 2013 3:40 PM
To: users@camel.apache.org
Subject: Re: camel-quartz and support for quartz 2.x

No Camel 2.11 will NOT support Quartz 2.x. One of the reason is Spring
3.0.x does not support Quartz 2.x, and Camel 2.11 is spring 3.0
compatible.

Camel 2.12 will be updated to Quartz 2.x as we dropped support for
Spring 3.0 in this release.

For Camel 2.11 you may manually try to upgrade quartz to 2.x if you are
not using spring or using spring 3.1 or better. Though not sure if you
hit any issue in doing so.

On Thu, May 30, 2013 at 7:36 AM, Patrick Bray patrick.b...@gmail.com
wrote:
 Hi All,

 Can you please confirm whether or not Camel v2.11.0 supports Quartz
v2.x?

 Checking JIRA I can see the following ticket is unresolved:

 https://issues.apache.org/jira/browse/CAMEL-4075

 If not can you adivse whether or not this is on the road map for Camel

 2.11.1?

 The issue we have is that we intend to have multiple application 
 components deployed that utilise a Clustered Quartz JDBC job store.

 From what I understand Quartz 1.8.x does not allow multiple logical 
 schedulers to share the same job store where as 2.x does (see 
 http://forums.terracotta.org/forums/posts/list/5562.page).

 Thanks,
 Patrick Bray



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-
 2-x-tp5712613p5733444.html Sent from the Camel - Users mailing list 
 archive at Nabble.com.



--
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
This e-mail and any attachments to it (the Communication) is, unless 
otherwise stated, confidential,  may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Australia and New Zealand Banking 
Group Limited ABN 11 005 357 522, or any of its related entities including ANZ 
Bank New Zealand Limited (together ANZ). ANZ does not accept liability in 
connection with the integrity of or errors in the Communication, computer 
virus, data corruption, interference or delay arising from or in respect of the 
Communication.


Re: Camel Quartz and JobStore

2013-05-23 Thread garrydias
JBoss 7 does not have Quartz in its modules.

Is this problem related to this issue
https://issues.apache.org/jira/browse/CAMEL-6067?

thanx



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853p5733043.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Quartz and JobStore

2013-05-22 Thread garrydias
Hi mpaiva.

The jboss 7 disable feature is not directly related to your issue. It seems
your jboss7 disable procedure is shutting down your CamelContext and your
quartz routes as well.

Can u certify yourself if the tables data disapears at CamelContext
shutdown?

[]s



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853p5732971.html
Sent from the Camel - Users mailing list archive at Nabble.com.


ThreadPoolProfile for Camel Quartz Component

2013-05-22 Thread Edwin
Hi Folks,

I am using the Quartz component in a route. I have noticed many Quartz
Consumer worker threads running from observing the logs. For my use case, it
is desired to have only 1 Quartz worker thread.

I do not see any options on the Quartz component to specify an
executorServiceRef. If I define a ThreadPoolProfile in the Camel Context
with poolSize of 1, will the Quartz component automatically use this profile
therefore only creating 1 Quartz Consumer worker thread for my route?

Any insights are much appreciated.

Thanks,
Edwin



--
View this message in context: 
http://camel.465427.n5.nabble.com/ThreadPoolProfile-for-Camel-Quartz-Component-tp5732976.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ThreadPoolProfile for Camel Quartz Component

2013-05-22 Thread Claus Ibsen
Hi

You need to configure this on Quartz itself
http://www.quartz-scheduler.org/documentation/quartz-1.x/configuration/ConfigThreadPool



On Wed, May 22, 2013 at 7:37 PM, Edwin edwin.rabbi...@gmail.com wrote:
 Hi Folks,

 I am using the Quartz component in a route. I have noticed many Quartz
 Consumer worker threads running from observing the logs. For my use case, it
 is desired to have only 1 Quartz worker thread.

 I do not see any options on the Quartz component to specify an
 executorServiceRef. If I define a ThreadPoolProfile in the Camel Context
 with poolSize of 1, will the Quartz component automatically use this profile
 therefore only creating 1 Quartz Consumer worker thread for my route?

 Any insights are much appreciated.

 Thanks,
 Edwin



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/ThreadPoolProfile-for-Camel-Quartz-Component-tp5732976.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel Quartz and JobStore

2013-05-22 Thread Chris Wolf
Don't forget that JBoss runs it's own instance of Quartz as a service.
I'm not sure
how you're configuring the JobStore implementation, but if it's via
the quartz.properties
and the JBoss instance of quartz reads the same properties, then maybe
there's a conflict?

On Mon, May 20, 2013 at 5:41 PM, mpaivafontes mpaivafon...@gmail.com wrote:
 Hello,

 I'm trying to use the misfire property from Camel-Quartz persisting the data
 at the database ( SQL server ) with JobStore from Quartz but i'm facing a
 strange problem after the restart of the application.

 For some reason after the restart, all data disappear for some reason and
 the misfire is not getting triggered.

 When i setted the xx.isClustered=true the all data is kept what does make
 sense, but it's not my case.

 I would like to know if is there any way to keep the data intact after the
 app restart so i can see the misfire working properly.

 The class used to control the transaction is
 org.quartz.impl.jdbcjobstore.JobStoreTX

 Regards !



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Quartz and JobStore

2013-05-22 Thread mpaivafontes
Hello garrydias,

The data disapear during the CamelContext shutdown at the route shutdown.

*14:43:19,421 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC
service thread 1-7) Apache Camel 2.11.0 (CamelContext:
infosender-scheduler-camelContext) is shutting down*
14:43:19,423 INFO  [org.apache.camel.impl.DefaultShutdownStrategy] (MSC
service thread 1-7) Starting to graceful shutdown 71 routes (timeout 300
seconds)
14:43:19,444 INFO  [org.apache.camel.impl.DefaultShutdownStrategy] (Camel
(infosender-scheduler-camelContext) thread #25 - ShutdownTask) Route:
/schedule540 shutdown complete, was consuming from:
Endpoint[quartz://?cron=0+0+12%2C17+*+*+%3Fstateful=truetrigger.misfireInstruction=1]
.
.
.
14:43:20,007 INFO  [org.apache.camel.impl.DefaultShutdownStrategy] (MSC
service thread 1-7) Graceful shutdown of 71 routes completed in 0 seconds
14:43:20,860 INFO  [org.apache.camel.component.quartz.QuartzComponent] (MSC
service thread 1-7) There are no more jobs registered, so shutting down
Quartz scheduler: QuartzScheduler
14:43:20,865 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread
1-7) Scheduler QuartzScheduler_$_NON_CLUSTERED shutting down.
14:43:20,866 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread
1-7) Scheduler QuartzScheduler_$_NON_CLUSTERED paused.
14:43:20,867 INFO  [org.quartz.core.QuartzScheduler] (MSC service thread
1-7) Scheduler QuartzScheduler_$_NON_CLUSTERED shutdown complete.
14:43:20,878 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC service
thread 1-7) Uptime 28.908 seconds
*14:43:20,879 INFO  [org.apache.camel.spring.SpringCamelContext] (MSC
service thread 1-7) Apache Camel 2.11.0 (CamelContext:
infosender-scheduler-camelContext) is shutdown in 1.457 seconds*



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853p5732978.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Quartz and JobStore

2013-05-22 Thread mpaivafontes
Hello Chris Wolf,

I don't think it could be a conflict problem since that the properties are
been set correctly 
Anyway i'm going to check

Thanks for reply



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853p5732982.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Quartz and JobStore

2013-05-21 Thread mpaivafontes
Hello Claus,

I'm already setting stateful=true and the data is getting modified properly.

I've noticed that the  IS_VOLATILE column might have something in this, but
i've changed by updating the column manually but nothing happened.

I'm using jboss7.1 and when i disable the app the data get deleted after
each route shutdown.

Any other idea what might be ?

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853p5732897.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Quartz and JobStore

2013-05-20 Thread mpaivafontes
Hello,

I'm trying to use the misfire property from Camel-Quartz persisting the data
at the database ( SQL server ) with JobStore from Quartz but i'm facing a
strange problem after the restart of the application.

For some reason after the restart, all data disappear for some reason and
the misfire is not getting triggered.

When i setted the xx.isClustered=true the all data is kept what does make
sense, but it's not my case.

I would like to know if is there any way to keep the data intact after the
app restart so i can see the misfire working properly.

The class used to control the transaction is
org.quartz.impl.jdbcjobstore.JobStoreTX

Regards !



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Quartz and JobStore

2013-05-20 Thread Claus Ibsen
Hi

Can you try setting stateful=true


On Mon, May 20, 2013 at 11:41 PM, mpaivafontes mpaivafon...@gmail.com wrote:
 Hello,

 I'm trying to use the misfire property from Camel-Quartz persisting the data
 at the database ( SQL server ) with JobStore from Quartz but i'm facing a
 strange problem after the restart of the application.

 For some reason after the restart, all data disappear for some reason and
 the misfire is not getting triggered.

 When i setted the xx.isClustered=true the all data is kept what does make
 sense, but it's not my case.

 I would like to know if is there any way to keep the data intact after the
 app restart so i can see the misfire working properly.

 The class used to control the transaction is
 org.quartz.impl.jdbcjobstore.JobStoreTX

 Regards !



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Quartz-and-JobStore-tp5732853.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Incorrect info in Camel Quartz component.

2013-05-10 Thread Daniel H
Hi,

I noticed that at the location http://camel.apache.org/quartz.html, the
following is stated:

By default Quartz will look for a quartz.properties file in the root of the
classpath. If you are using WAR deployments this means just drop the
quartz.properties in WEB-INF/classes

That doesn´t seem to work. By looking at the Quartz component code, you see
that the quartz.properties file should be located under the classpath root
at level org/quartz/quartz.properties.

Regards,
Daniel
Twitter: @dannemano



--
View this message in context: 
http://camel.465427.n5.nabble.com/Incorrect-info-in-Camel-Quartz-component-tp5732246.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Incorrect info in Camel Quartz component.

2013-05-10 Thread Claus Ibsen
Hi

Thanks for reporting. I am updating the docs.

On Fri, May 10, 2013 at 9:37 AM, Daniel H pifod...@gmail.com wrote:
 Hi,

 I noticed that at the location http://camel.apache.org/quartz.html, the
 following is stated:

 By default Quartz will look for a quartz.properties file in the root of the
 classpath. If you are using WAR deployments this means just drop the
 quartz.properties in WEB-INF/classes

 That doesn´t seem to work. By looking at the Quartz component code, you see
 that the quartz.properties file should be located under the classpath root
 at level org/quartz/quartz.properties.

 Regards,
 Daniel
 Twitter: @dannemano



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Incorrect-info-in-Camel-Quartz-component-tp5732246.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel quartz component query

2013-03-13 Thread cheekychops
I expect that if you configured quartz to use a clustered jobstore, and
connected to the same database with another quartz instance you could add
more triggers, but I don't think the Quartz Component was really designed to
work this way.

Note that its not recommended to insert triggers directly into the database,
you should use the Quartz API.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-component-query-tp5728942p5729086.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel quartz component query

2013-03-11 Thread gilboy
Hi

Assume I have a route which is using the quartz component(using the quartz
database store). 

Is it possible at runtime to add new triggers. In other words, assume I have
an ad-hoc route that I want to execute. If I configure this route to use the
quartz component with the quartz database store. Can I now add ad-hoc new
triggers to the database at runtime which will result in the route getting
executed

Thanks
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quartz-component-query-tp5728942.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel quartz component query

2013-03-11 Thread Willem jiang
Hi,

Camel has the management API[1], which could be used to start or stop the route.
I think you can leverage this API to start a route from the trigger.

[1]http://camel.apache.org/management-example.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 12, 2013 at 12:15 AM, gilboy wrote:

 Hi
  
 Assume I have a route which is using the quartz component(using the quartz
 database store).  
  
 Is it possible at runtime to add new triggers. In other words, assume I have
 an ad-hoc route that I want to execute. If I configure this route to use the
 quartz component with the quartz database store. Can I now add ad-hoc new
 triggers to the database at runtime which will result in the route getting
 executed
  
 Thanks
 Joe
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-quartz-component-query-tp5728942.html
 Sent from the Camel - Users mailing list archive at Nabble.com 
 (http://Nabble.com).





Re: Camel Quartz Bug

2013-01-27 Thread Christian Müller
Can you increase the max. cache size for Camel endpoints as described at
[1]?

[1]
http://camel.apache.org/how-do-i-configure-the-maximum-endpoint-cache-size-for-camelcontext.html

Best,
Christian

On Sat, Jan 26, 2013 at 12:11 PM, garrydias garryd...@gmail.com wrote:

 Adding an output of my test case:
 Triggered Jobs: 1200
 Fired Jobs: 200
 camel-quartz-test.txt
 http://camel.465427.n5.nabble.com/file/n5726337/camel-quartz-test.txt



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285p5726337.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




--


Re: Camel Quartz Bug

2013-01-27 Thread garrydias
Thanx Christian. You are right. Set Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE
property before camel1.start() is the key to solve my problem.

This is not a bug after all.

Thanx again

[]s




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285p5726392.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Quartz Bug

2013-01-27 Thread Claus Ibsen
On Mon, Jan 28, 2013 at 12:46 AM, garrydias garryd...@gmail.com wrote:
 Thanx Christian. You are right. Set Exchange.MAXIMUM_ENDPOINT_CACHE_SIZE
 property before camel1.start() is the key to solve my problem.

 This is not a bug after all.


Ah well in fact we fixed an issue in the upcoming Camel releases
related to this, hitting the cache limit.
This should be fixed in next releases of Camel.


 Thanx again

 []s




 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285p5726392.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel Quartz Bug

2013-01-26 Thread Claus Ibsen
On Fri, Jan 25, 2013 at 8:55 PM, garrydias garryd...@gmail.com wrote:
 ... a little more info:

 When I start 999 camel quartz routes I have 999 triggers fired .

 Is 999 the limit. Why? There´s some extra configuration of something?


Hi

I think you should look at the Quartz Scheduler if there is a
reasonable limit, what a scheduler
can handle of statelful jobs/triggers.

Also you should possible consider your design, why do you need 1000s+
Camel routes that trigger almost
the same quartz cron trigger?


 Thanx



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285p5726288.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel Quartz Bug

2013-01-26 Thread Claus Ibsen
On Sat, Jan 26, 2013 at 9:37 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Fri, Jan 25, 2013 at 8:55 PM, garrydias garryd...@gmail.com wrote:
 ... a little more info:

 When I start 999 camel quartz routes I have 999 triggers fired .

 Is 999 the limit. Why? There´s some extra configuration of something?


 Hi

 I think you should look at the Quartz Scheduler if there is a
 reasonable limit, what a scheduler
 can handle of statelful jobs/triggers.

 Also you should possible consider your design, why do you need 1000s+
 Camel routes that trigger almost
 the same quartz cron trigger?


Oh and you may want to add more threads to the quartz scheduler so it
has more power
as you trigger the jobs at the same time.

You can configure this in the quartz.properties file for example.



 Thanx



 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285p5726288.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 FuseSource is now part of Red Hat
 Email: cib...@redhat.com
 Web: http://fusesource.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel Quartz Bug

2013-01-26 Thread garrydias
Thanks Claus.

I redesigned my scheduler project to solve my problem but is a matter of
time until my application start more than 1000 again.

I couldn´t find nothing related to reasonable stateful job limit in the
Quartz docs. Using plain quartz this problem does not happens. Using plain
Quartz I could also fire over 5000 jobs facing a slow down at the job
execution(expected behavior of StatefulJob) only.

And change the threadCount to a different than 10 (default defined by
camel-quarz), the problem still reamains. Camel logs the output bellow,
indicating that 100 threads are started but it is unable to fire more than
1000 jobs.

/279 [main] INFO org.apache.camel.impl.DefaultCamelContext - Apache Camel
2.9.2 (CamelContext: camel-1) is starting
280 [main] INFO org.apache.camel.management.ManagementStrategyFactory - JMX
enabled. Using ManagedManagementStrategy.
416 [main] INFO
org.apache.camel.management.DefaultManagementLifecycleStrategy -
StatisticsLevel at All so enabling load performance statistics
502 [main] INFO
org.apache.camel.impl.converter.AnnotationTypeConverterLoader - Found 3
packages with 15 @Converter classes to load
522 [main] INFO org.apache.camel.impl.converter.DefaultTypeConverter -
Loaded 170 core type converters (total 170 type converters)
526 [main] INFO
org.apache.camel.impl.converter.AnnotationTypeConverterLoader - Loaded 2
@Converter classes
532 [main] INFO org.apache.camel.impl.converter.DefaultTypeConverter -
Loaded additional 9 type converters (total 179 type converters) in 0.009
seconds
544 [main] INFO org.apache.camel.component.quartz.QuartzComponent - Loading
Quartz properties file from classpath: quartz.properties
592 [main] INFO org.quartz.core.SchedulerSignalerImpl - Initialized
Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
592 [main] INFO org.quartz.core.QuartzScheduler - Quartz Scheduler v.1.8.5
created.
594 [main] INFO org.quartz.simpl.RAMJobStore - RAMJobStore initialized.
594 [main] INFO org.quartz.core.QuartzScheduler - Scheduler meta-data:
Quartz Scheduler (v1.8.5) 'QuartzScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 100 threads.
  Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.

594 [main] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler
'QuartzScheduler' initialized from an externally provided properties
instance.
594 [main] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler
version: 1.8.5/


The worse case of this fail I see starting 1200 jobs: camel-quartz always
fire only 200 of these jobs. Doesn´t matter the thread pool size .

Thanks again.

Nice weekend



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285p5726336.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Quartz Bug

2013-01-25 Thread garrydias
Friends,

I think there´s a bug in camel-quartz component.

When I start 500 camel quartz routes I have 500 triggers fired.
When I start 600 camel quartz routes I have 600 triggers fired.
When I start 700 camel quartz routes I have 700 triggers fired.
When I start 800 camel quartz routes I have 800 triggers fired.
When I start 900 camel quartz routes I have 900 triggers fired.
When I start 1000 camel quartz routes I have 975 triggers fired.
When I start 1000 camel quartz routes I have 899 triggers fired.
When I start 1000 camel quartz routes I have 940 triggers fired.
...
So, when I start 1000 camel quartz routes I have [something less than 1000]
triggers fired.

I attached my context.xml and Java Test Case.

Does somebody knows what is happening?

My production app try start over 3000 camel quartz jobs but not all of them
is fired.

Thanx
MassiveCamelQuartzTest.java
http://camel.465427.n5.nabble.com/file/n5726285/MassiveCamelQuartzTest.java  
destinationTestContext.xml
http://camel.465427.n5.nabble.com/file/n5726285/destinationTestContext.xml  
log4j.properties
http://camel.465427.n5.nabble.com/file/n5726285/log4j.properties  
pom.xml http://camel.465427.n5.nabble.com/file/n5726285/pom.xml  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quartz-Bug-tp5726285.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel - Quartz hangs on POST calls

2012-12-18 Thread Christian Müller
You posted the question twice. Please find my answer in [1].

[1]
http://camel.465427.n5.nabble.com/Camel-causes-socket-write-error-td5724284.html

Best,
Christian

On Tue, Dec 18, 2012 at 2:39 PM, krishna krishnab...@gmail.com wrote:

 Hi,

 The quartz-camel set up hangs, if the POST restlet is not returning any
 response.

 Scenario : We have a quartz configured to run every minute which triggers a
 GET restful webservice to get records based on a condition, which is parsed
 and posted to a POST/PUT restful web service.

 Problem : 1. If we are not getting any response from webservice, the camel
 -
 quartz setup is entirely hanging
 2. In some cases, in camel log the message says the URL has been posted,
 but
 I am not able to see the request on the Jetty server log.

 In either of teh scenario, the camel - quartz hangs.

 Please find the camel context below.

 camel.xml http://camel.465427.n5.nabble.com/file/n5724282/camel.xml

 Question:

 How to configure thread time out intreval in camel context for restlet
 calls?

 Environment:

 Camel - 2.8
 JDK - 1.6
 Camel-Quartz - 2.8
 Jetty Server - 7.4.5

 Thanks,
 Krishnan



 --
 View this message in context:
 http://camel.465427.n5.nabble.com/Camel-Quartz-hangs-on-POST-calls-tp5724282.html
 Sent from the Camel - Users mailing list archive at Nabble.com.




--


Re: camel+quartz schedulers

2012-07-20 Thread Sudhakar.kaithepalli

can you tell me how to stop camel routes please. Its urgent to me.


-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716245.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-20 Thread Sudhakar.kaithepalli
Hi

   Thanks for your quick response... 
and
1.) can u tell me how to stop camel route after it hit the FTP server.
one more thing is
2.) how can i find out the size of files in FTP server?


Thanks and regards..


-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716260.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-20 Thread Sudhakar.kaithepalli



SimpleTrigger means, my camel route like this...

from(quartz://schedulerJob?trigger.repeatInterval=6trigger.repeatCount=+SimpleTrigger.REPEAT_INDEFINITELY).to(some
bean method ).end()

This is wht my camel route using quartz scheduler


-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716261.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-19 Thread Sudhakar.kaithepalli
Hi to all .

  I am using Camel and Quartz to schedule a job and in Quartz also i
used SimpleTrigger. But the problem here is the trigger fires while we start
the server itself, we don't want like that. It should fire on configured
time only not at initial time.
How to configure it. And the following is my configuration..

from(quartz://SchedulerJob?trigger.repeatInterval=+repeatInterval+trigger.repeatCount=+SimpleTrigger.REPEAT_INDEFINITELY)

Thanks and Regards

-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716240.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-19 Thread Magnus Palmér
Unless you are on a very old version the simple trigger will not fire when
starting the route (the fireNow property)
However if your repeat interval is small it might look like that.

What I normally use is the option of delaying the start of the Quartz
scheduler itself.

Look for Starting the Quartz scheduler
http://camel.apache.org/quartz.html


2012/7/19 Sudhakar.kaithepalli sudhakar.kaithepa...@gmail.com

 Hi to all .

   I am using Camel and Quartz to schedule a job and in Quartz also
 i
 used SimpleTrigger. But the problem here is the trigger fires while we
 start
 the server itself, we don't want like that. It should fire on configured
 time only not at initial time.
 How to configure it. And the following is my configuration..


 from(quartz://SchedulerJob?trigger.repeatInterval=+repeatInterval+trigger.repeatCount=+SimpleTrigger.REPEAT_INDEFINITELY)

 Thanks and Regards

 -
 Sudhakar Kaithepalli
 --
 View this message in context:
 http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716240.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: camel+quartz schedulers

2012-07-16 Thread Sudhakar.kaithepalli
Hi...

   How to get file size, which is there in ftp server using camel Exchange?


-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716063.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-16 Thread Pontus Ullgren
Hello,

The file size is available in the message headers (CamelFileLength).
See http://camel.apache.org/file2.html

// Pontus

On Mon, Jul 16, 2012 at 8:25 AM, Sudhakar.kaithepalli
sudhakar.kaithepa...@gmail.com wrote:
 Hi...

How to get file size, which is there in ftp server using camel Exchange?


 -
 Sudhakar Kaithepalli
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716063.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-14 Thread Sudhakar.kaithepalli
Hi Good Morning...

 Thanks for ur response Pontus...
But i don't want to interact with Active-MQ in between camel route and FTP
server. And on more thing How can i get no. of files in FTP server through
camel route? plz tell me its very urgent to me..

ThanksRegards..
Sudhakar Kaithepalli



-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716030.html
Sent from the Camel - Users mailing list archive at Nabble.com.


camel+quartz schedulers

2012-07-13 Thread Sudhakar.kaithepalli
Hi,

In my project, i used camel and  quartz for scheduling. For time base its
working fine.But for frequency and volume based scheduling i don't have any
idea.Please Help me regarding camel route creation for either for frequency
based or for volume based. Here frequency means no. of files and volume
means file size...

Thanks
Sudhakar K

--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-13 Thread Pontus Ullgren
Hi,

For the frequency I belive you can use the Throttler pattern.
http://camel.apache.org/throttler.html

For volume you can write a RoutePolicy to suspend/resume the routes
when certain condtitions met.
See http://camel.apache.org/routepolicy.html and
http://camel.apache.org/route-throttling-example.html

I guess you could also write your own processor that simply checks if
the condition in met and then blocks for a period of time.

// Pontus


On Fri, Jul 13, 2012 at 10:13 AM, Sudhakar.kaithepalli
sudhakar.kaithepa...@gmail.com wrote:
 Hi,

 In my project, i used camel and  quartz for scheduling. For time base its
 working fine.But for frequency and volume based scheduling i don't have any
 idea.Please Help me regarding camel route creation for either for frequency
 based or for volume based. Here frequency means no. of files and volume
 means file size...

 Thanks
 Sudhakar K

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-13 Thread Sudhakar.kaithepalli
Hi Pontus ...

  ThankQ for ur reply Pontus ..


-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5715999.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-13 Thread Sudhakar.kaithepalli
HI.

   Actually my requirement is i've  a sheduler table in DB.in that
end-user store frequency as 10 files, every time we need to check with FTP
during camel route if  FTP contain =10 files then only we can start actual
task..
This is my requirement..

Thanks and Regards.
Sudhakar Kaithepalli


-
Sudhakar Kaithepalli
--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716001.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel+quartz schedulers

2012-07-13 Thread Pontus Ullgren
Ok then I misunderstood your question.

In your case a PollingConsumerPollStrategy [1] might be more suitable.
But I guess it could also be achieved by using a route policy that
starts the FTP route once the correct number of files are present.

[1] http://camel.apache.org/polling-consumer.html

// Pontus


On Fri, Jul 13, 2012 at 1:54 PM, Sudhakar.kaithepalli
sudhakar.kaithepa...@gmail.com wrote:
 HI.

Actually my requirement is i've  a sheduler table in DB.in that
 end-user store frequency as 10 files, every time we need to check with FTP
 during camel route if  FTP contain =10 files then only we can start actual
 task..
 This is my requirement..

 Thanks and Regards.
 Sudhakar Kaithepalli


 -
 Sudhakar Kaithepalli
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/camel-quartz-schedulers-tp5715992p5716001.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz and support for quartz 2.x

2012-05-24 Thread Claus Ibsen
Maybe in Camel 2.11 we can upgrade to quartz 2.x.

Then if people use Spring and Quartz together, they may have to use Spring 3.1.

Any thoughts?


On Thu, May 24, 2012 at 5:32 AM, Claus Ibsen claus.ib...@gmail.com wrote:
 On Wed, May 23, 2012 at 11:48 PM, Romain Manni-Bucau
 rmannibu...@gmail.com wrote:
 Hi,

 normally spring 3.1 supports quartz 2


 Yeah but Spring 3.0 does not. And Camel have to support Spring 3.0 onwards.


 - Romain


 2012/5/23 Christian Müller christian.muel...@gmail.com

 Nestor, please have a look at
 https://issues.apache.org/jira/browse/CAMEL-4075
 As long as Spring doesn't support Quartz 2.x, we also want to stick with
 Quartz 1.x.

 Best,
 Christian

 On Sun, May 20, 2012 at 9:00 PM, Nestor Urquiza nestor.urqu...@gmail.com
 wrote:

  Yes they are incompatible as there are several changes in 2.x. In this
 case
  what is failing is CrontTrigger is now an interface rather than a class.
 
  I will need to interact with quartz 1.x API to provide information about
  tasks, jobs and triggers.
 
  --
  View this message in context:
 
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5712679.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 




 --
 Claus Ibsen
 -
 CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: camel-quartz and support for quartz 2.x

2012-05-24 Thread Christian Müller
+1 for waiting until Spring 3.1 is the default version (2.11. or 3.0.) and
it supports Quartz 2.x

Best,
Christian

Sent from a mobile device
Am 24.05.2012 08:25 schrieb Claus Ibsen claus.ib...@gmail.com:

 Maybe in Camel 2.11 we can upgrade to quartz 2.x.

 Then if people use Spring and Quartz together, they may have to use Spring
 3.1.

 Any thoughts?


 On Thu, May 24, 2012 at 5:32 AM, Claus Ibsen claus.ib...@gmail.com
 wrote:
  On Wed, May 23, 2012 at 11:48 PM, Romain Manni-Bucau
  rmannibu...@gmail.com wrote:
  Hi,
 
  normally spring 3.1 supports quartz 2
 
 
  Yeah but Spring 3.0 does not. And Camel have to support Spring 3.0
 onwards.
 
 
  - Romain
 
 
  2012/5/23 Christian Müller christian.muel...@gmail.com
 
  Nestor, please have a look at
  https://issues.apache.org/jira/browse/CAMEL-4075
  As long as Spring doesn't support Quartz 2.x, we also want to stick
 with
  Quartz 1.x.
 
  Best,
  Christian
 
  On Sun, May 20, 2012 at 9:00 PM, Nestor Urquiza 
 nestor.urqu...@gmail.com
  wrote:
 
   Yes they are incompatible as there are several changes in 2.x. In
 this
  case
   what is failing is CrontTrigger is now an interface rather than a
 class.
  
   I will need to interact with quartz 1.x API to provide information
 about
   tasks, jobs and triggers.
  
   --
   View this message in context:
  
 
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5712679.html
   Sent from the Camel - Users mailing list archive at Nabble.com.
  
 
 
 
 
  --
  Claus Ibsen
  -
  CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
  FuseSource
  Email: cib...@fusesource.com
  Web: http://fusesource.com
  Twitter: davsclaus, fusenews
  Blog: http://davsclaus.blogspot.com/
  Author of Camel in Action: http://www.manning.com/ibsen/



 --
 Claus Ibsen
 -
 CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
 FuseSource
 Email: cib...@fusesource.com
 Web: http://fusesource.com
 Twitter: davsclaus, fusenews
 Blog: http://davsclaus.blogspot.com/
 Author of Camel in Action: http://www.manning.com/ibsen/



Re: camel-quartz and support for quartz 2.x

2012-05-24 Thread Nestor Urquiza
+1 for also adding more fields to the quartz component so persisted quartz
jobs are not rescheduled.

BTW I cannot speak for all components but so far what I have tested has been
under Spring 3.1.0-RELEASE and camel-2.9-2. Everything looks fine so far.

I hope quartz will support iCalendar, please vote if you are interested
(read http://forums.terracotta.org/forums/posts/list/0/6293.page#35127) but
in the meanwhile being able to support quartz2.x will at least allow to use
http://code.google.com/p/jwatch/ as I said.

Great 

--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5713518.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-quartz and support for quartz 2.x

2012-05-23 Thread Christian Müller
Nestor, please have a look at
https://issues.apache.org/jira/browse/CAMEL-4075
As long as Spring doesn't support Quartz 2.x, we also want to stick with
Quartz 1.x.

Best,
Christian

On Sun, May 20, 2012 at 9:00 PM, Nestor Urquiza nestor.urqu...@gmail.comwrote:

 Yes they are incompatible as there are several changes in 2.x. In this case
 what is failing is CrontTrigger is now an interface rather than a class.

 I will need to interact with quartz 1.x API to provide information about
 tasks, jobs and triggers.

 --
 View this message in context:
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5712679.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



Re: camel-quartz and support for quartz 2.x

2012-05-23 Thread Romain Manni-Bucau
Hi,

normally spring 3.1 supports quartz 2

- Romain


2012/5/23 Christian Müller christian.muel...@gmail.com

 Nestor, please have a look at
 https://issues.apache.org/jira/browse/CAMEL-4075
 As long as Spring doesn't support Quartz 2.x, we also want to stick with
 Quartz 1.x.

 Best,
 Christian

 On Sun, May 20, 2012 at 9:00 PM, Nestor Urquiza nestor.urqu...@gmail.com
 wrote:

  Yes they are incompatible as there are several changes in 2.x. In this
 case
  what is failing is CrontTrigger is now an interface rather than a class.
 
  I will need to interact with quartz 1.x API to provide information about
  tasks, jobs and triggers.
 
  --
  View this message in context:
 
 http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5712679.html
  Sent from the Camel - Users mailing list archive at Nabble.com.
 



Re: camel-quartz and support for quartz 2.x

2012-05-23 Thread Nestor Urquiza
I ended up using quartz 1 but not from Camel anyway as posted here
http://camel.465427.n5.nabble.com/Configure-Camel-to-consume-externally-configured-quartz-jobs-td5712732.html

I use persistence and the quartz api to schedule jobs that call Camel routes
but I opted not to use the camel-quartz component. I will start using it if
it supports my use case which it does not at the moment.

Thank you guys for coming back with your feedback,

-Nestor

--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-quartz-and-support-for-quartz-2-x-tp5712613p5713445.html
Sent from the Camel - Users mailing list archive at Nabble.com.


  1   2   >