Available as of Camel 2.1
The camel-jboss is a component which allows you to run Camel inside JBoss Application Server. This component is needed due JBoss classloading challenges.
The component is a specialized Camel Pluggable Class Resolvers to remedy this.
If you are using JBoss 4.x/5.x then you need to use
camel-jboss JAR. If you are using JBoss 6.x then you need to use
The resolver is provided in the class
org.apacheextras.camel.jboss.JBossPackageScanClassResolver in the
camel-jboss jar file.
Camel 2.8 onwards
From Camel 2.8 onwards there is no longer the need for using this camel-jboss component as Camel is now capable of loading type converters without package scanning. This requires though that all 3rd party components with type converter must define the name of the converter classes as FQN in the
META-INF/org/apache/camel/TypeConverter file. See more details at Type Converter.
One exception is if you are using Bindy component as it still needs this JBoss resolver.
Using with Java DSL
You need to configure the resolver on the CamelContext which is done like this:
Using with Spring XML
When using Spring XML its just a matter of defining a spring bean with the JBoss class resolver as shown:
The Camel Extra project was moved to an official associated Apache site and as part of the migration the package names in the source code must not use
org.apache so we renamed the packages as shown above. But if you are using the older versions of the JAR files then you need to use as shown below:
You need to get the component from the Camel Extra project as JBoss uses LPGL license which cannot be hosted at Apache.