Repository: activemq
Updated Branches:
  refs/heads/activemq-5.15.x 972b3fa6c -> 887db9e2f


AMQ-6970 - Adding SSL params for RAR

Fixing missing ssl parameters when configuring rar. Also fixing
configuration logic of inproper null checks inside
ActiveMQManagedConnectionFactory

Thank you to Flavia Rainone for the patch

(cherry picked from commit e39db5693496d48f0d704f9f14f8e2c9b6a153cf)


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

Branch: refs/heads/activemq-5.15.x
Commit: 887db9e2f2736b8869df8f987d7a6918b65d01c9
Parents: 972b3fa
Author: Christopher L. Shannon (cshannon) <[email protected]>
Authored: Fri Jul 27 07:25:35 2018 -0400
Committer: Christopher L. Shannon (cshannon) <[email protected]>
Committed: Fri Jul 27 07:28:14 2018 -0400

----------------------------------------------------------------------
 .../activemq/ra/ActiveMQConnectionFactory.java  |  1 +
 .../activemq/ra/ActiveMQConnectionSupport.java  | 20 ++++++++++++++++++
 .../ra/ActiveMQManagedConnectionFactory.java    | 22 +++++++++++++++-----
 3 files changed, 38 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/887db9e2/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
----------------------------------------------------------------------
diff --git 
a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
 
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
index 234fc30..4e30a37 100644
--- 
a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
+++ 
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
@@ -91,6 +91,7 @@ public class ActiveMQConnectionFactory implements 
ConnectionFactory, QueueConnec
             if (manager == null) {
                 throw new JMSException("No JCA ConnectionManager configured! 
Either enable UseInboundSessionEnabled or get your JCA container to configure 
one.");
             }
+
             return (Connection)manager.allocateConnection(factory, 
connectionRequestInfo);
         } catch (ResourceException e) {
             // Throw the root cause if it was a JMSException..

http://git-wip-us.apache.org/repos/asf/activemq/blob/887db9e2/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
----------------------------------------------------------------------
diff --git 
a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
 
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
index c3e0e9b..86d788f 100644
--- 
a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
+++ 
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionSupport.java
@@ -193,6 +193,10 @@ public class ActiveMQConnectionSupport {
         info.setServerUrl(url);
     }
 
+    public String getTrustStore() {
+        return info.getTrustStore();
+    }
+
     public void setTrustStore(String trustStore) {
         if (log.isDebugEnabled()) {
             log.debug(this + ", setting [trustStore] to: " + trustStore);
@@ -200,6 +204,10 @@ public class ActiveMQConnectionSupport {
         info.setTrustStore(trustStore);
     }
 
+    public String getTrustStorePassword() {
+        return info.getTrustStorePassword();
+    }
+
     public void setTrustStorePassword(String trustStorePassword) {
         if (log.isDebugEnabled()) {
             log.debug(this + ", setting [trustStorePassword] to: " + 
trustStorePassword);
@@ -207,6 +215,10 @@ public class ActiveMQConnectionSupport {
         info.setTrustStorePassword(trustStorePassword);
     }
 
+    public String getKeyStore() {
+        return info.getKeyStore();
+    }
+
     public void setKeyStore(String keyStore) {
         if (log.isDebugEnabled()) {
             log.debug(this + ", setting [keyStore] to: " + keyStore);
@@ -214,6 +226,10 @@ public class ActiveMQConnectionSupport {
         info.setKeyStore(keyStore);
     }
 
+    public String getKeyStorePassword() {
+        return info.getKeyStorePassword();
+    }
+
     public void setKeyStorePassword(String keyStorePassword) {
         if (log.isDebugEnabled()) {
             log.debug(this + ", setting [keyStorePassword] to: " + 
keyStorePassword);
@@ -221,6 +237,10 @@ public class ActiveMQConnectionSupport {
         info.setKeyStorePassword(keyStorePassword);
     }
 
+    public String getKeyStoreKeyPassword() {
+        return info.getKeyStoreKeyPassword();
+    }
+
     public void setKeyStoreKeyPassword(String keyStoreKeyPassword) {
         if (log.isDebugEnabled()) {
             log.debug(this + ", setting [keyStoreKeyPassword] to: " + 
keyStoreKeyPassword);

http://git-wip-us.apache.org/repos/asf/activemq/blob/887db9e2/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
----------------------------------------------------------------------
diff --git 
a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
 
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
index a7344e4..b9b452b 100644
--- 
a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
+++ 
b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
@@ -76,21 +76,33 @@ public class ActiveMQManagedConnectionFactory extends 
ActiveMQConnectionSupport
             if (getUserName() == null) {
                 setUserName(baseInfo.getUserName());
             }
-            if (getDurableTopicPrefetch() != null) {
+            if (getDurableTopicPrefetch() == null) {
                 setDurableTopicPrefetch(baseInfo.getDurableTopicPrefetch());
             }
-            if (getOptimizeDurableTopicPrefetch() != null) {
+            if (getOptimizeDurableTopicPrefetch() == null) {
                 
setOptimizeDurableTopicPrefetch(baseInfo.getOptimizeDurableTopicPrefetch());
             }
-            if (getQueuePrefetch() != null) {
+            if (getQueuePrefetch() == null) {
                 setQueuePrefetch(baseInfo.getQueuePrefetch());
             }
-            if (getQueueBrowserPrefetch() != null) {
+            if (getQueueBrowserPrefetch() == null) {
                 setQueueBrowserPrefetch(baseInfo.getQueueBrowserPrefetch());
             }
-            if (getTopicPrefetch() != null) {
+            if (getTopicPrefetch() == null) {
                 setTopicPrefetch(baseInfo.getTopicPrefetch());
             }
+            if (getKeyStore() == null) {
+                setKeyStore(baseInfo.getKeyStore());
+            }
+            if (getKeyStorePassword() == null) {
+                setKeyStorePassword(baseInfo.getKeyStorePassword());
+            }
+            if (getTrustStore() == null) {
+                setTrustStore(baseInfo.getTrustStore());
+            }
+            if (getTrustStorePassword() == null) {
+                setTrustStorePassword(baseInfo.getTrustStorePassword());
+            }
         }
     }
 

Reply via email to