Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 17819 invoked from network); 11 Sep 2007 05:47:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2007 05:47:52 -0000 Received: (qmail 91884 invoked by uid 500); 11 Sep 2007 05:47:45 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 91859 invoked by uid 500); 11 Sep 2007 05:47:45 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 91850 invoked by uid 99); 11 Sep 2007 05:47:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2007 22:47:45 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 05:47:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8693C1A9832; Mon, 10 Sep 2007 22:47:31 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r574465 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java Date: Tue, 11 Sep 2007 05:47:31 -0000 To: commits@activemq.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070911054731.8693C1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jstrachan Date: Mon Sep 10 22:47:30 2007 New Revision: 574465 URL: http://svn.apache.org/viewvc?rev=574465&view=rev Log: use the same ConnectionFactory so that transactional consume + send can use the same session Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java?rev=574465&r1=574464&r2=574465&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java Mon Sep 10 22:47:30 2007 @@ -46,30 +46,12 @@ } @Override - public ActiveMQConnectionFactory getListenerConnectionFactory() { - return (ActiveMQConnectionFactory) super.getListenerConnectionFactory(); - } - - @Override - public void setListenerConnectionFactory(ConnectionFactory listenerConnectionFactory) { - if (listenerConnectionFactory instanceof ActiveMQConnectionFactory) { - super.setListenerConnectionFactory(listenerConnectionFactory); - } - else { - throw new IllegalArgumentException("ConnectionFactory " + listenerConnectionFactory - + " is not an instanceof " + ActiveMQConnectionFactory.class.getName()); - } - } - - @Override - protected ConnectionFactory createListenerConnectionFactory() { + protected ConnectionFactory createConnectionFactory() { ActiveMQConnectionFactory answer = new ActiveMQConnectionFactory(); + if (answer.getBeanName() == null) { + answer.setBeanName("Camel"); + } answer.setBrokerURL(getBrokerURL()); return answer; - } - - @Override - protected ConnectionFactory createTemplateConnectionFactory() { - return new PooledConnectionFactory(getListenerConnectionFactory()); } }