camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Beginner Question about re-routing to a different queue
Date Tue, 09 Oct 2007 05:20:07 GMT
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 have
> 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