camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Guther" <>
Subject RE: Beginner Question about re-routing to a different queue
Date Tue, 09 Oct 2007 14:32:31 GMT

Thank you for your help and solving the problem.

Indeed I was running ActiveMQ 4.1.1 and Camel 1.1.0 yesterday.  I
changed to Camel 1.2.0 but currently have to stay with ActiveMQ 4.1.1. I
added the following dependency to the pom.xml file in the spring example


This allowed me to use the following change in the example router:


Camel is a really exiting project!  I can't wait to explore more pattern


-----Original Message-----
From: James Strachan [] 
Sent: Monday, October 08, 2007 10:20 PM
Subject: Re: Beginner Question about re-routing to a different queue

On 09/10/2007, Andreas Guther <> wrote:
> Hi, by accident I posted the following the ActiveMQ mailing list but
> wanted to ask the question on the Camel User list.  Thanks in advance
> for any help.


> I started to look into Apache Camel and I am actually pretty excited
> about the different implemented Enterprise Integration Patterns.

Great! :)

> I looked into the RouteBuilder and experimented with routing messages.
> I could get the Spring and the JMS File examples to work and now I
> the idea to route incoming messages from one queue to another one.
> Somehow I thought I could do something like
> from("activemq:test.MyQueue").to("activemq:test.MyQueue2");
> But that gives me a build error:
> [INFO]
> ---------------------------------------------------------------------
> [INFO]
> ---------------------------------------------------------------------
> [INFO] null
> org/apache/commons/pool/ObjectPoolFactory
> It looks like I am missing some basics here but unfortunately I am not
> able to find a solution to this little exercise.
> Can someone please push me in the right direction?

So the code you're using is exactly correct!

In earlier versions of Camel by default we'd use the
PooledConnectionFactory with ActiveMQ; so the exception you're getting
is just that commons-pool is not on the classpath. Our bad for not
making that clear.

FWIW in later versions fo Camel and ActiveMQ; the activemq component
ships with ActiveMQ itself in 5.0 or later; and we've moved from using
the PoolConnectionFactory to using the caching levels in the
MessageListenerContainer in spring to ensure transactional consistency
(so the above takes place in a single JMS transaction).

So when using ActiveMQ 5.0 or later and Camel 1.2 or later you'd not
get the above exception as we'd not be using the


Open Source SOA

View raw message