Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 4750 invoked from network); 9 Oct 2007 05:20:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 05:20:39 -0000 Received: (qmail 36008 invoked by uid 500); 9 Oct 2007 05:20:27 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 35949 invoked by uid 500); 9 Oct 2007 05:20:27 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 35940 invoked by uid 99); 9 Oct 2007 05:20:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2007 22:20:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 05:20:28 +0000 Received: by wx-out-0506.google.com with SMTP id s14so1802441wxc for ; Mon, 08 Oct 2007 22:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=frJ3MsbL4MRkkJiXC+ZRnp4t970cE8KWDRrur1vNXtc=; b=WUoBoKpQ+I1nMhjH/0bkRlSewo75QdNXcdYdf4k/M8j7FB0eP24VC9mDjfUpegtuzW5c2X/wnlR0daqnCYLq5tc3wO5M22UB7BVs8bpaUgHX6bKEBvyPYeqFA7OcgFjscWbel3OOItyKLYiRKQg9e0iCaTJ9PDgqn/vopDUcNaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=h9AQmU4NV23osfqDCkdv1TfB64DH7a2a9K3HyaxDs+2LU8sDL6N7/ksRnL3vw43O0kL/ckBSGqNQNRV9nNk1aXD1DyE5+KKlqoODj/uaoTEYTraBBXCaEJcaK4fPcUzCXhRwswok1GvzKZB5Xfdb9WuauCZQ2dfdUCIzY0fehRs= Received: by 10.90.25.3 with SMTP id 3mr350852agy.1191907207157; Mon, 08 Oct 2007 22:20:07 -0700 (PDT) Received: by 10.90.67.7 with HTTP; Mon, 8 Oct 2007 22:20:07 -0700 (PDT) Message-ID: Date: Tue, 9 Oct 2007 06:20:07 +0100 From: "James Strachan" To: camel-user@activemq.apache.org Subject: Re: Beginner Question about re-routing to a different queue In-Reply-To: <3FB08D6A21B3EC4D8749EF6D9E62627801E766AA@WDCCPMAIL01.markettools.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3FB08D6A21B3EC4D8749EF6D9E62627801E766AA@WDCCPMAIL01.markettools.com> X-Virus-Checked: Checked by ClamAV on apache.org 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. [snip] > 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] > --------------------------------------------------------------------- > [ERROR] BUILD ERROR > [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 PooledConnectionFactory -- James ------- http://macstrac.blogspot.com/ Open Source SOA http://open.iona.com