Have you tried to create the process like that
from(queue)
.process(new Processor() {
public void process(Exchange e) throws Exception {
String xml = (String) e.getIn().getBody();
InputStream is =
e.getContext().getTypeConverter().mandatoryConvertTo(InputStream.class,
xml);
RoutesDefinition def =
e.getContext().loadRoutesDefinition(is);
e.getContext().addRouteDefinitions(def.getRoutes());
}
});
Regards,
Charles Moulliard
Sr. Principal Solution Architect - FuseSource
Apache Committer
Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard
On Thu, May 26, 2011 at 5:53 PM, [email protected]
<[email protected]> wrote:
>
> Charles Moulliard wrote:
>>
>> How have created your camelContext ?
>>
>
> The first route reads form a activemq queue. It receives the xml file and
> create a processor giving him the message and its camelcontext.
> So i do not need to create another camelcontext:
>
> DynamicRouteHandler dynamicRouteHandler=new
> DynamicRouteHandler(this.getContext(), configProp);
> from(queue).process(dynamicRouteHandler);
>
> Hope i'm clear enough.
> Thanks for your time.
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/loadRoutesDefinition-and-jaxb-index-tp4428835p4429064.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>