Hi Romain,
This is really interesting what you have have developed. I don't really like
how you add RouteBuilder in the create method (class CamelContextBean) and I
would prefer that the user can provide this information like we do in a more
Camel traditional way. By the way, I suggest that in the CamelContextBean
class (method create) we use CdiCamelContext as it implements Camel Registry
to do CDI bean lookup in the registry.
@Inject
@CamelContextId("context1")
private CamelContext ctx1;
ctx1.addRoutes(new MyRouteBuilder())
Remark : camel-cdi (2.10) allows already to do this ;-)
@Inject
protected CdiCamelContext camelCtx;
@Inject
protected org.fusesource.example.cdi.camel.SimpleCamelRoute simpleRoute;
...
simpleRoute.setTimerUri("timer://simple?fixedRate=true&period=10s");
// Add Camel Route
camelCtx.addRoutes(simpleRoute);
So what could be the benefit to use this CDI extension ?
I will have a look on that today.
Regards,
Charles
-----
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com
--
View this message in context:
http://camel.465427.n5.nabble.com/camel-cdi-extension-tp5715506p5715512.html
Sent from the Camel Development mailing list archive at Nabble.com.