You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Running Camel standalone and have it keep running

If you are using Camel as a standalone Java application, then Camel provides a Main class you can reuse to more easily boot up Camel and keep it running until the JVM terminates, for example when pressing ctrl + c.

The Main class is provided in the following two components

  • camel-core JAR in the org.apache.camel.Main class (requires Camel 2.6)
  • camel-spring JAR in the org.apache.camel.spring.Main class

Using camel-core JAR example

Available as of Camel 2.6

The following example shows how you can create your main class, named MainExample and use the Main class from Camel.

Error formatting macro: snippet: java.lang.NullPointerException

Using camel-spring JAR example

TODO: refer to other examples

  • No labels