Red Hat
Dec 21, 2015
by Christina Lin
Apache Camel in JBoss Fuse allow you to choose your favorite way to develop your integration application, and now it let you choose your favorite container to run it in. I put up a summary list of what each DSL are available, and made comparison between them. 

Available DSL in different Containers

Domain Specific Language
Apache Karaf in JBoss Fuse
(OSGi Container)

Blueprint DSL (recommended)
Java DSL
Spring DSL
JBoss Enterprise Application Server
(JavaEE application Server)
Java DSL with CDI (recommended)
DSL with JNDI registry
Spring DSL

The reason to recommend blueprint in Karaf is that it provides a dependency injection framework in OSGi. The service lifecycle are monitored and managed, as it can dynamically shutdown or activate at anytime, blueprint can performs actions based on the state of each bundle, it is a much managed way to do in OSGi Container.
In Java EE container, JBoss Enterprise Application Platform, it also has a dependency injection framework – CDI. As the container will take care of the lifecycle of the beans.

There are no right and wrongs of which DSL you choose to work with, in fact you don’t have to choose just one, the beauty of JBoss Fuse is the freedom that it gives you to do what you prefer to do. Just make sure you choose the ones that you are most comfortable with. With that in mind, since I have posted the three different ways to develop Integration application on JBoss EAP, I have put together a small table that compares the difference between them.

Comparing Application development using different DSL on JBoss EAP 

Java DSL with CDI
Spring DSL
Route XML with JNDI Registry
CDI context managed by container
Application Context as Registry
JNDI Registry
Bean Register
CDI API using annotation
On xml
Implement CamelContextLifecycle <JndiRegistry>, initiate and bind bean in JNDI registry
Required Web.xml setting
Setup JndiCamelServletContextListener
Camel Context and Route Building
Implement RouteBuilder Class
Spring Framework XML with naming *-camel-context.xml
Route Framework and in web.xml set routeBuilder-MyRoute context parameter
DataSource Lookup
Lookup by CDI and provide via @Producer
Lookup using jee schema in Spring
Calling JNDI name in component

JBDS Tooling
Route Description language

These are base on one fact that the JBoss Fuse subsystem is correctly installed in JBoss EAP.

Original Post