activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/2] activemq-artemis git commit: ARTEMIS-302 - Cloning Connection Factory to avoid closing CFs from JNDI
Date Thu, 17 Dec 2015 02:33:17 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master f8741db4a -> 327299965


ARTEMIS-302 - Cloning Connection Factory to avoid closing CFs from JNDI


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/eddd3be4
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/eddd3be4
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/eddd3be4

Branch: refs/heads/master
Commit: eddd3be46b295e825973664d6358b1d3aea83047
Parents: f8741db
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Dec 16 19:20:39 2015 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Dec 16 19:20:39 2015 -0500

----------------------------------------------------------------------
 .../apache/activemq/artemis/ra/inflow/ActiveMQActivation.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/eddd3be4/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
index d7a242d..f42db64 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
@@ -463,7 +463,9 @@ public class ActiveMQActivation {
          }
          Object fac = ctx.lookup(spec.getConnectionFactoryLookup());
          if (fac instanceof ActiveMQConnectionFactory) {
-            factory = (ActiveMQConnectionFactory) fac;
+            // This will clone the connection factory
+            // to make sure we won't close anyone's connection factory when we stop the MDB
+            factory = ActiveMQJMSClient.createConnectionFactory(((ActiveMQConnectionFactory)
fac).toURI().toString(), "internalConnection");
          }
          else {
             factory = ra.newConnectionFactory(spec);


Mime
View raw message