Versions Compared

Key

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

...

What this does is boot up the Spring ApplicationContext defined in the file META-INF/spring/camel-context.xml on the classpath. This is a regular Spring XML document which uses the Camel Xml Configuration to configure a CamelContext. Notice how the <camelContext> element is configured

...

The packages attribute defines the comma separated list of Java package names which are recursively searched for Java classes on the classpath which implement the RouteBuilder interface. What this means is that Camel will automatically detect our MyRouteBuilder class and automatically install its routes. Of course, in practice you should not specify org.apache.camel (or a sub package of this) as the package name because this will instruct Camel to search in its own packages for your routes.

...

Also note at the end of this XML example file we explicitly configure the ActiveMQ component with details of how to connect to the broker.