activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
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 GMT
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());
     }
 }



Mime
View raw message