Date: Tue, 19 Mar 2024 05:29:00 +0000 (UTC) Message-ID: <873164037.54371.1710826140203@cwiki-he-fi.apache.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_54370_809240073.1710826140203" ------=_Part_54370_809240073.1710826140203 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
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.
JBoss version
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
camel-jboss=
6
JAR.
The resolver is provided in the class org.apacheextras.camel.jboss=
.JBossPackageScanClassResolver
in the camel-jboss
jar f=
ile.
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 pack=
age 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 <=
a href=3D"/confluence/display/CAMEL/Type+Converter">Type Converter.
One exception is if you are using Bindy component as it still needs this JBoss resolver.
You need to configure the resolver on the CamelContext which is done like this:
PackageScan= ClassResolver jbossResolver =3D new JBossPackageScanClassResolver(); CamelContext context =3D new DefaultCamelContext(); context.setPackageScanClassResolver(jbossResolver);
When using Spring XML its just a matter of defining a spring bean with t= he JBoss class resolver as shown:
<bean i= d=3D"jbossResolver" class=3D"org.apacheextras.camel.jboss.JBossPackageScanC= lassResolver"/> <camelContext id=3D"camel" xmlns=3D"http://camel.apache.org/schema/spr= ing"> <route> <from uri=3D"seda:start"/> <to uri=3D"mock:result"/> </route> </camelContext>
The Camel Extra project was moved to an official associ=
ated Apache site and as part of the migration the package names in the sour=
ce code must not use org.apache
so we renamed the packages as =
shown above. But if you are using the older versions o=
f the JAR files then you need to use as shown below:
<bean i= d=3D"jbossResolver" class=3D"org.apache.camel.jboss.JBossPackageScanClassRe= solver"/>
You need to get the component from the Camel Extra pr= oject as JBoss uses LPGL license which cannot be hosted at= Apache.