From 21f86a4844083d7cb23f26b4c4a164ef932bfe2d Mon Sep 17 00:00:00 2001 From: Josh Reagan Date: Mon, 26 Jun 2017 16:41:22 -0600 Subject: [PATCH] ARTEMIS-1255 Fixed authentication issues with XAConnectionFactory Added the global user/password variables to all of the variations of the createContext/createConnectionFactory methods. (cherry picked from commit 177bda4892b0aabd89311ec28b91762fb22ebaae) --- .../jms/client/ActiveMQConnectionFactory.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java index dee81573d1..0580d73ed6 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java @@ -309,7 +309,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactoryOptions, Exte } public QueueConnection createQueueConnection() throws JMSException { - return createQueueConnection(null, null); + return createQueueConnection(user, password); } public QueueConnection createQueueConnection(final String username, final String password) throws JMSException { @@ -319,7 +319,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactoryOptions, Exte // TopicConnectionFactory implementation -------------------------------------------------------- public TopicConnection createTopicConnection() throws JMSException { - return createTopicConnection(null, null); + return createTopicConnection(user, password); } public TopicConnection createTopicConnection(final String username, final String password) throws JMSException { @@ -330,7 +330,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactoryOptions, Exte @Override public XAConnection createXAConnection() throws JMSException { - return createXAConnection(null, null); + return createXAConnection(user, password); } @Override @@ -340,7 +340,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactoryOptions, Exte @Override public XAJMSContext createXAContext() { - return createXAContext(null, null); + return createXAContext(user, password); } @Override @@ -358,7 +358,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactoryOptions, Exte // XAQueueConnectionFactory implementation ------------------------------------------------------ public XAQueueConnection createXAQueueConnection() throws JMSException { - return createXAQueueConnection(null, null); + return createXAQueueConnection(user, password); } public XAQueueConnection createXAQueueConnection(final String username, final String password) throws JMSException { @@ -368,7 +368,7 @@ public class ActiveMQConnectionFactory implements ConnectionFactoryOptions, Exte // XATopicConnectionFactory implementation ------------------------------------------------------ public XATopicConnection createXATopicConnection() throws JMSException { - return createXATopicConnection(null, null); + return createXATopicConnection(user, password); } public XATopicConnection createXATopicConnection(final String username, final String password) throws JMSException {