You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Julian Cable (Created) (JIRA)" <ji...@apache.org> on 2011/11/18 16:10:51 UTC

[jira] [Created] (CAMEL-4692) can't use same route policy on two routes

can't use same route policy on two routes
-----------------------------------------

                 Key: CAMEL-4692
                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.8.2
         Environment: tomcat6
            Reporter: Julian Cable


The following XML DSL defines two routes using the same route policy:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

  <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
    <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>

    <camel:package>cdp_test</camel:package>
    <camel:route id="r1" routePolicyRef="pol1">
      <camel:from uri="file://data/1"/>
      <camel:to uri="stream:out"/>
    </camel:route>
    <camel:route id="r2" routePolicyRef="pol1">
      <camel:from uri="file://data/2"/>
      <camel:to uri="stream:out"/>
    </camel:route>

  </camel:camelContext>

  <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
    <property name="routeStartTime" value="00,30 * * * * ? *"/>
    <property name="routeStopTime"  value="10,40 * * * * ? *"/>
  </bean>

</beans>

This is the logging output. r2 does not follow the policy:

[pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
[pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
[pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
[pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
[pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
[pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
[pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
hello 1
[artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
[el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
[artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
[artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
hello 2
hello 2
[artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
hello 2
[artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
[el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
[artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
[artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]

If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4692) can't use same quartz scheduled route policy on two routes

Posted by "Claus Ibsen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4692:
-------------------------------

      Component/s:     (was: camel-core)
                   camel-quartz
    Fix Version/s: 2.9.0
                   2.8.4
         Assignee: Claus Ibsen
          Summary: can't use same quartz scheduled route policy on two routes  (was: can't use same route policy on two routes)
    
> can't use same quartz scheduled route policy on two routes
> ----------------------------------------------------------
>
>                 Key: CAMEL-4692
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz
>    Affects Versions: 2.8.2
>         Environment: tomcat6
>            Reporter: Julian Cable
>            Assignee: Claus Ibsen
>             Fix For: 2.8.4, 2.9.0
>
>         Attachments: routePolicy.diff
>
>
> The following XML DSL defines two routes using the same route policy:
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
>   <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>     <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>
>     <camel:package>cdp_test</camel:package>
>     <camel:route id="r1" routePolicyRef="pol1">
>       <camel:from uri="file://data/1"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>     <camel:route id="r2" routePolicyRef="pol1">
>       <camel:from uri="file://data/2"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>   </camel:camelContext>
>   <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
>     <property name="routeStartTime" value="00,30 * * * * ? *"/>
>     <property name="routeStopTime"  value="10,40 * * * * ? *"/>
>   </bean>
> </beans>
> This is the logging output. r2 does not follow the policy:
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
> [pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
> [pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
> hello 1
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> hello 2
> hello 2
> [artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> hello 2
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4692) can't use same route policy on two routes

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154986#comment-13154986 ] 

Claus Ibsen commented on CAMEL-4692:
------------------------------------

Is the problem also when starting? eg the log above shows that only r1 is stopped.
                
> can't use same route policy on two routes
> -----------------------------------------
>
>                 Key: CAMEL-4692
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.2
>         Environment: tomcat6
>            Reporter: Julian Cable
>
> The following XML DSL defines two routes using the same route policy:
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
>   <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>     <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>
>     <camel:package>cdp_test</camel:package>
>     <camel:route id="r1" routePolicyRef="pol1">
>       <camel:from uri="file://data/1"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>     <camel:route id="r2" routePolicyRef="pol1">
>       <camel:from uri="file://data/2"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>   </camel:camelContext>
>   <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
>     <property name="routeStartTime" value="00,30 * * * * ? *"/>
>     <property name="routeStopTime"  value="10,40 * * * * ? *"/>
>   </bean>
> </beans>
> This is the logging output. r2 does not follow the policy:
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
> [pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
> [pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
> hello 1
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> hello 2
> hello 2
> [artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> hello 2
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4692) can't use same quartz scheduled route policy on two routes

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4692.
--------------------------------

    Resolution: Fixed

Thanks Bilgin for the patch. Keep up the good work. Its been noticed you great work for the community.
                
> can't use same quartz scheduled route policy on two routes
> ----------------------------------------------------------
>
>                 Key: CAMEL-4692
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz
>    Affects Versions: 2.8.2
>         Environment: tomcat6
>            Reporter: Julian Cable
>            Assignee: Claus Ibsen
>             Fix For: 2.8.4, 2.9.0
>
>         Attachments: routePolicy.diff
>
>
> The following XML DSL defines two routes using the same route policy:
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
>   <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>     <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>
>     <camel:package>cdp_test</camel:package>
>     <camel:route id="r1" routePolicyRef="pol1">
>       <camel:from uri="file://data/1"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>     <camel:route id="r2" routePolicyRef="pol1">
>       <camel:from uri="file://data/2"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>   </camel:camelContext>
>   <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
>     <property name="routeStartTime" value="00,30 * * * * ? *"/>
>     <property name="routeStopTime"  value="10,40 * * * * ? *"/>
>   </bean>
> </beans>
> This is the logging output. r2 does not follow the policy:
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
> [pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
> [pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
> hello 1
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> hello 2
> hello 2
> [artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> hello 2
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4692) can't use same route policy on two routes

Posted by "Julian Cable (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155004#comment-13155004 ] 

Julian Cable commented on CAMEL-4692:
-------------------------------------

Hi Claus, in the example, r1 will start and stop on schedule whereas r2 stays active always.

Julian
                
> can't use same route policy on two routes
> -----------------------------------------
>
>                 Key: CAMEL-4692
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.2
>         Environment: tomcat6
>            Reporter: Julian Cable
>
> The following XML DSL defines two routes using the same route policy:
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
>   <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>     <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>
>     <camel:package>cdp_test</camel:package>
>     <camel:route id="r1" routePolicyRef="pol1">
>       <camel:from uri="file://data/1"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>     <camel:route id="r2" routePolicyRef="pol1">
>       <camel:from uri="file://data/2"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>   </camel:camelContext>
>   <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
>     <property name="routeStartTime" value="00,30 * * * * ? *"/>
>     <property name="routeStopTime"  value="10,40 * * * * ? *"/>
>   </bean>
> </beans>
> This is the logging output. r2 does not follow the policy:
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
> [pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
> [pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
> hello 1
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> hello 2
> hello 2
> [artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> hello 2
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4692) can't use same quartz scheduled route policy on two routes

Posted by "Julian Cable (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13155537#comment-13155537 ] 

Julian Cable commented on CAMEL-4692:
-------------------------------------

Fantastic, Thanks guys. I'll put a dev build together and try it.

Julian
                
> can't use same quartz scheduled route policy on two routes
> ----------------------------------------------------------
>
>                 Key: CAMEL-4692
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz
>    Affects Versions: 2.8.2
>         Environment: tomcat6
>            Reporter: Julian Cable
>            Assignee: Claus Ibsen
>             Fix For: 2.8.4, 2.9.0
>
>         Attachments: routePolicy.diff
>
>
> The following XML DSL defines two routes using the same route policy:
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
>   <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>     <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>
>     <camel:package>cdp_test</camel:package>
>     <camel:route id="r1" routePolicyRef="pol1">
>       <camel:from uri="file://data/1"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>     <camel:route id="r2" routePolicyRef="pol1">
>       <camel:from uri="file://data/2"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>   </camel:camelContext>
>   <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
>     <property name="routeStartTime" value="00,30 * * * * ? *"/>
>     <property name="routeStopTime"  value="10,40 * * * * ? *"/>
>   </bean>
> </beans>
> This is the logging output. r2 does not follow the policy:
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
> [pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
> [pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
> hello 1
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> hello 2
> hello 2
> [artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> hello 2
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4692) can't use same route policy on two routes

Posted by "Bilgin Ibryam (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bilgin Ibryam updated CAMEL-4692:
---------------------------------

    Attachment: routePolicy.diff

ScheduledRoutePolicy was working only with one route (the first one assigned) at a time. I tried to fix that by introducing a map (a little bit refactoring) to store the routes using the same policy.

Julian, can you give it a try?
                
> can't use same route policy on two routes
> -----------------------------------------
>
>                 Key: CAMEL-4692
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4692
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.2
>         Environment: tomcat6
>            Reporter: Julian Cable
>         Attachments: routePolicy.diff
>
>
> The following XML DSL defines two routes using the same route policy:
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
>   <camel:camelContext xmlns="http://camel.apache.org/schema/spring">
>     <camel:propertyPlaceholder id="properties" location="file:///etc/camel/css.properties"/>
>     <camel:package>cdp_test</camel:package>
>     <camel:route id="r1" routePolicyRef="pol1">
>       <camel:from uri="file://data/1"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>     <camel:route id="r2" routePolicyRef="pol1">
>       <camel:from uri="file://data/2"/>
>       <camel:to uri="stream:out"/>
>     </camel:route>
>   </camel:camelContext>
>   <bean id="pol1" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
>     <property name="routeStartTime" value="00,30 * * * * ? *"/>
>     <property name="routeStopTime"  value="10,40 * * * * ? *"/>
>   </bean>
> </beans>
> This is the logging output. r2 does not follow the policy:
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler 'DefaultQuartzScheduler-camel-1' initialized from an externally provided properties instance.
> [pache.camel.spring.Main.main()] StdSchedulerFactory            INFO  Quartz scheduler version: 1.8.4
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-START-r1 for action: START on route:
> [pache.camel.spring.Main.main()] ScheduledRoutePolicy           INFO  Scheduled trigger: triggerGroup-r1.trigger-STOP-r1 for action: STOP on route:
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Route: r2 started and consuming from: Endpoint[file://data/2]
> [pache.camel.spring.Main.main()] QuartzComponent                INFO  Starting Quartz scheduler: DefaultQuartzScheduler-camel-1
> [pache.camel.spring.Main.main()] QuartzScheduler                INFO  Scheduler DefaultQuartzScheduler-camel-1_$_NON_CLUSTERED started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Total 2 routes, of which 2 is started.
> [pache.camel.spring.Main.main()] SpringCamelContext             INFO  Apache Camel 2.8.2 (CamelContext: camel-1) started in 0.596 seconds
> hello 1
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-2] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-2] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> hello 2
> hello 2
> [artzScheduler-camel-1_Worker-3] SpringCamelContext             INFO  Route: r1 started and consuming from: Endpoint[file://data/1]
> hello 2
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Starting to graceful shutdown 1 routes (timeout 10000 milliseconds)
> [el-1) thread #2 - ShutdownTask] DefaultShutdownStrategy        INFO  Route: r1 shutdown complete, was consuming from: Endpoint[file://data/1]
> [artzScheduler-camel-1_Worker-4] DefaultShutdownStrategy        INFO  Graceful shutdown of 1 routes completed in 0 seconds
> [artzScheduler-camel-1_Worker-4] SpringCamelContext             INFO  Route: r1 stopped, was consuming from: Endpoint[file://data/1]
> If I use two separate identical route policies it works as I expect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira