Archive for the ‘spring’ Tag

Apache Camel + JBoss 5 + Spring

This is a followup to my previous post about how to get Apache Camel 1.6.0 to work using JBoss 5.  In this post, I provide some code to use configure Camel using Spring.  As with vanilla Camel, you cannot do this with JBoss 5 due to the fact that Camel’s ResolverUtil does not understand JBoss’s “virtual file system”.

Please note Claus Ibsen’s comment in my original post that he plans to allow the ResolverUtil to be configurable in Apache Camel 2.0.  In the meantime, you can refer to code I have provided at GitHub, which is based on camel-osgi.

As before, a pom.xml file is provided to build the jar.  Place the jar file in your JBoss 5 installation’s server/[config]/lib directory.

In your spring xml, be sure to use the new namespace that I have defined for Camel + JBoss 5 when you define your camelContext.  For example:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

  <jboss:camelContext xmlns="">
      <from uri="imaps://[yourusername]&amp;password=[yourpassword]&amp;
      <to uri="log:example.camel?level=DEBUG"/>