mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
2ebea251cd
commit
e39db56934
|
@ -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..
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue