How to install Camel components which are not shipped with FSW
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.x
- Red Hat JBoss Fuse
- 6.2.1
- 6.3.0
- Apache Camel
Issue
- How can the Camel components which are supported in JBoss Fuse be used in the JBoss FSW ? For example,
camel-httpandcamel-jetty, in This content is not included.Camel URI binding or directly in a Camel route. - If SwitchYard application is run with the following Camel URI binding configuration:
<sca:reference name="SampleReference" multiplicity="0..1" promote="SampleComponent/SampleReference">
<sca:interface.java interface="com.redhat.samples.switchyard.SampleService"/>
<camel_1:binding.uri configURI="http://localhost:12345">
<camel_1:contextMapper/>
</camel_1:binding.uri>
</sca:reference>
- Following exception is observed:
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http://localhost:12345
due to: No component found with scheme: http
- How can the Camel components be installed into the FSW ?
Resolution
Camel components can be installed as extension module. This is described in the Switchyard Development Guide:
FSW 6.0.0: This content is not included."Chapter 13. Extensions"
Fuse 6.2.1: "Chapter 18. Extension"
Fuse 6.3.0: "Chapter 18. Extension"
Any Camel components shipped in JBoss Fuse can be installed. Installed components will be supported if the version of the component is the same as the others which are built-in in FSW. For instance, the version of Camel components built-in in FSW 6.0.0 is 2.10.0.redhat-60024, which is the supported version; and you can find this version in the JBoss Fuse 6.0.0 distribution.
Once components are made available as modules, the Maven scope can be made 'provided' in pom.xml.
See the attachment (This content is not included.xquery-saxon-module-and-test.zip) which demonstrates how to achieve this for one specific component, in this case it is camel-saxon which amongst others includes support for XQuery.
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.