THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
class MyRouteBean extends RoutesBuilderRouteBuilder { @Override public void configure() { from("jms:invoices").to("file:/invoices"); } } |
...
Code Block | ||
---|---|---|
| ||
@ContextName("camel-context") class MyRouteBean extends RoutesBuilderRouteBuilder { @Override public void configure() { from("jms:invoices").to("file:/invoices"); } } |
...
Similarly, the @Default
qualifier can be used to observe Camel events for the default Camel context if multiples contexts exist, e.g.:
...
Code Block | ||
---|---|---|
| ||
void onExchangeCompleted(@Observes @Default ExchangeCompletedEvent event) { // Called after the exchange 'event.getExchange()' processing has completed } |
In that example, if no qualifier is specified, the @Any
qualifier is implicitly assumed, so that corresponding events for all the Camel contexts get received.
...
- illustrates how to work with Camel using CDI to configure components, endpoints and beans,camel-example-cdi
camel-example-cdi-metrics
- illustrates the integration between Camel, Dropwizard Metrics and CDI,camel-example-cdi-properties
- illustrates the integration between Camel, DeltaSpike and CDI for configuration properties,camel-example-cdi-osgi
- a CDI application using the SJMS component that can be executed inside an OSGi container using PAX CDI,camel-example-cdi-test
- demonstrates the testing features that are provided as part of the integration between Camel and CDI,camel-example-cdi-rest-servlet
- illustrates the Camel REST DSL being used in a Web application that uses CDI as dependency injection framework,camel-example-widget-gadget-cdi
- the Widget and Gadget use-case from the EIP book implemented in Java with CDI dependency Injection,camel-example-swagger-cdi
- an example using REST DSL and Swagger Java with CDI.
See Also
- Camel CDI Testing
- CDI Web site
- CDI ecosystem
- Going further with CDI (See Camel CDI section)