You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Richa <rs...@gmail.com> on 2013/04/02 11:45:56 UTC

CronSchedulePolicy with cxf endpoint

Hi,
I have a cron expression which triggers the route at a particular time
everyday. This works fine with all the endpoints like ftp,sftp, etc. But
when I use a cxf endpoint, the route runs for the first time, but the next
day the route does not start. Can you please tell me why this is happening?



--
View this message in context: http://camel.465427.n5.nabble.com/CronSchedulePolicy-with-cxf-endpoint-tp5730206.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CronSchedulePolicy with cxf endpoint

Posted by Christian Müller <ch...@gmail.com>.
Can you provide a simple unit test?
Or can you enable TRACE/DEBUG logging for org.apache.camel and share the
log?

Best,
Christian


On Thu, Apr 4, 2013 at 6:50 AM, Richa <rs...@gmail.com> wrote:

> We are stopping the route dynamically using a shutdown processor based on
> some business conditions.
> Basically, shutdown processor has the below code:
>
> exchange.getContext().stopRoute(RouteID,60000,TimeUnit.MILLISECONDS);
>
> This results in the following log statement on the console:
> "Graceful shutdown of route completed!"
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/CronSchedulePolicy-with-cxf-endpoint-tp5730206p5730304.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: CronSchedulePolicy with cxf endpoint

Posted by Richa <rs...@gmail.com>.
We are stopping the route dynamically using a shutdown processor based on
some business conditions.
Basically, shutdown processor has the below code: 

exchange.getContext().stopRoute(RouteID,60000,TimeUnit.MILLISECONDS);

This results in the following log statement on the console:
"Graceful shutdown of route completed!"



--
View this message in context: http://camel.465427.n5.nabble.com/CronSchedulePolicy-with-cxf-endpoint-tp5730206p5730304.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CronSchedulePolicy with cxf endpoint

Posted by Christian Müller <ch...@gmail.com>.
I miss the "routeStopTime" configuration [1]. Otherwise the route is still
running. Do I miss something?

[1] http://camel.apache.org/cronscheduledroutepolicy.html

Best,
Christian


On Wed, Apr 3, 2013 at 8:51 AM, Richa <rs...@gmail.com> wrote:

> My route looks like this:
>
> CronScheduledRoutePolicy cronScheduledRoutePolicy=new
> CronScheduledRoutePolicy();
> cronScheduledRoutePolicy.setRouteStartTime("0 0/3 * * * ?");
>
> from("some sftp location")
> .noAutoStartup()
> .routePolicy(cronScheduledRoutePolicy)
> .to("cxf location")
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/CronSchedulePolicy-with-cxf-endpoint-tp5730206p5730254.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: CronSchedulePolicy with cxf endpoint

Posted by Richa <rs...@gmail.com>.
My route looks like this:

CronScheduledRoutePolicy cronScheduledRoutePolicy=new
CronScheduledRoutePolicy();
cronScheduledRoutePolicy.setRouteStartTime("0 0/3 * * * ?");

from("some sftp location")
.noAutoStartup()
.routePolicy(cronScheduledRoutePolicy)
.to("cxf location")



--
View this message in context: http://camel.465427.n5.nabble.com/CronSchedulePolicy-with-cxf-endpoint-tp5730206p5730254.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CronSchedulePolicy with cxf endpoint

Posted by Christian Müller <ch...@gmail.com>.
Can you share your route/configuration with us?

Sent from a mobile device
Am 02.04.2013 11:46 schrieb "Richa" <rs...@gmail.com>:

> Hi,
> I have a cron expression which triggers the route at a particular time
> everyday. This works fine with all the endpoints like ftp,sftp, etc. But
> when I use a cxf endpoint, the route runs for the first time, but the next
> day the route does not start. Can you please tell me why this is happening?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/CronSchedulePolicy-with-cxf-endpoint-tp5730206.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>