git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Camel spring DSL validaiton


Hi,

I have a use case where clients can send route xml files to my service which I add to camelContext

Code for adding route looks like :

public void createRoute(InputStream xmlRouteDefinition) throws Exception {



              RoutesDefinition routesDefinition = camelContext.loadRoutesDefinition(xmlRouteDefinition);

              camelContext.addRouteDefinitions(routesDefinition.getRoutes());

       }

Client can pass the following routes too –

<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns="http://camel.apache.org/schema/spring";>
<route id="route13" autoStartup="false">
    <from uri="anystring:start13"/>
    <to uri="aaaaaaaaaaa:result13"/>
</route>
</routes>

Is there any way of validating whether the components and their corresponding URI’s are correctly passed without calling the startRoute API in DefaultCamelContext?

Regards,
Vineet


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.