Hi,

Yes it is possible. Why not use a property placeholder that can be set using
a config file and set during deployment. The value should take effect at
route startup

http://camel.apache.org/properties.html
http://camel.apache.org/properties.html 

http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html
http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html
 

Cheers,

Ashwin...

--------------------------------------------------------------------------------------------

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

  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring";>
    <route id="MyRoute" autoStartup="${startFlag}"
routePolicyRef="routeStartStopPolicy" >
        .... 
    </route>

    <bean id="routeStartStopPolicy"
class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
        <property name="routeStartTime" value="0 0 10 * * ?/>
        <property name="routeStopTime" value="0 0 16 * * ?"/>
    </bean>
  </camelContext>

</beans>
------------------------------------------------------------------------------------

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
CamelOne 2011: http://fusesource.com/camel2011 
---------------------------------------------------------
--
View this message in context: 
http://camel.465427.n5.nabble.com/CronScheduledRoutePolicy-tp4552324p4553393.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to