Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Basically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a BootStrap class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The CdiCamelContext when instantiated will add a CDI Bean Registry. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes.

...