How to use Camel without Switchyard in Fuse on EAP

Solution Unverified - Updated -

Environment

  • Red Hat JBoss Fuse
    • 6.2.1
  • Red Hat JBoss Enterprise Application Pltatform (EAP)
    • 6.4.x

Issue

Resolution

  • If the project you have developed is not a switchyard project, then you can deploy a simple camel route either using Java DSL or spring DSL.
    For example, you can create a route in a spring xml file and name the file as 'name-camel-context.xml'. Here's suffix, -camel-context.xml is a must, without that the spring file will not be bootstrapped and the camelContext will not be instantiated.

  • You can create a 'jar' file and you can simply have META-INF/spring/hi-camel-context.xml. (you can give any name, i have given 'hi').
    Then you can directly deploy the file inside /deploy folder. In this case, you are not using switchyard, but a plain camel route.
    Similarly, in case of using Java DSL, you can refer to our quickstarts, quickstarts/camel.

  • Switchyard application have META-INF/switchyard.xml file. There are differences in switchyard applications and pure camel applications. You can see from the /quickstarts/switchyard.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.