Skip to content

Instantly share code, notes, and snippets.

@jstrachan
Created September 4, 2012 10:07
Show Gist options
  • Select an option

  • Save jstrachan/3619456 to your computer and use it in GitHub Desktop.

Select an option

Save jstrachan/3619456 to your computer and use it in GitHub Desktop.
// inject all current routes...
@Produces
CamelContext createMyContext(@Inject Instance<RouteBuilder> routes) {
return new CdiCamelContext(routes);
}
// inject certain routes to a named context
@Produces
@Named("myAccountingCamelContext")
CamelContext createMyContext(@Inject @Accounting Instance<RouteBuilder> routes) {
return new CdiCamelContext(routes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment