Again I am not sure about the use case and all the requirements, but
it is possible to build and start routes with other routes in camel.
That is very cool concept.

You could read the values from database(any other source) and use
these values to create new route. You could do something similar to
this:

route1
.read configuration from DB

  <transform>
        <mvel>context.addRoutes(new
MyRouteBuilderWithCron(starttime,endtime))</mvel>
      </transform>

That makes the assumption that you have another route builder
MyRouteBuilderWithCron which accepts properties which you have just
read from the database.

public class MyRouteBuilderWithCron extends RouteBuilder {

  private String starttime;
  private String endtime;

  @Override

  public void configure() throws Exception {
    // now in here you can instantiate a CronScheduledRoutePolicy

}
}

That will only work though if you reading of properties from database
is one off thing.






On Thu, Feb 13, 2014 at 2:16 PM, eswar [via Camel]
<ml-node+s465427n5747259...@n5.nabble.com> wrote:
> Yes I looked into SimpleScheduleRoutePolicy, the problem is the time comes
> from DB which is a dynamic value, and I use Spring XML for routes. so I was
> not sure on how to attach the dynamically created RoutePolicy reference in
> the route during the runtime.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Resume-an-Endpoint-in-a-Route-tp5747151p5747259.html
> To unsubscribe from Resume an Endpoint in a Route, click here.
> NAML




--
View this message in context: 
http://camel.465427.n5.nabble.com/Resume-an-Endpoint-in-a-Route-tp5747151p5747264.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to