diff options
author | liamfallon <liam.fallon@est.tech> | 2021-02-10 14:01:23 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2021-02-10 15:47:17 +0000 |
commit | c64320a45b77eb3474f1f3f7372f1cd1f85ddfef (patch) | |
tree | 45f3b9fc217b9a145b50f76aa2663de7be28adbe /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main | |
parent | 8f25e72bd3cef408f78037f6c85c264aa9899cf1 (diff) |
Remove URL and useerid from JMS plugin
This review makes the default URL and userid for JMS null, the actual
values must be specified as parameters.
Issue-ID: POLICY-3035
Change-Id: I9c06d94d8816092425e2df58b849d837ad953fb2
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main')
-rw-r--r-- | plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java index cdb3b4677..d93a1b981 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java @@ -84,8 +84,8 @@ public class JmsCarrierTechnologyParameters extends CarrierTechnologyParameters // Default parameter values private static final String DEFAULT_CONNECTION_FACTORY = "jms/RemoteConnectionFactory"; private static final String DEFAULT_INITIAL_CTXT_FACTORY = "org.jboss.naming.remote.client.InitialContextFactory"; - private static final String DEFAULT_PROVIDER_URL = "remote://localhost:4447"; - private static final String DEFAULT_SECURITY_PRINCIPAL = "userid"; + private static final String DEFAULT_PROVIDER_URL = null; + private static final String DEFAULT_SECURITY_PRINCIPAL = null; private static final String DEFAULT_SECURITY_CREDENTIALS = null; private static final String DEFAULT_CONSUMER_TOPIC = "apex-in"; private static final String DEFAULT_PRODUCER_TOPIC = "apex-out"; @@ -150,8 +150,14 @@ public class JmsCarrierTechnologyParameters extends CarrierTechnologyParameters final Properties jmsProperties = new Properties(); jmsProperties.put(PROPERTY_INITIAL_CONTEXT_FACTORY, initialContextFactory); - jmsProperties.put(PROPERTY_PROVIDER_URL, providerUrl); - jmsProperties.put(PROPERTY_SECURITY_PRINCIPAL, securityPrincipal); + + if (providerUrl != null) { + jmsProperties.put(PROPERTY_PROVIDER_URL, providerUrl); + } + + if (securityPrincipal != null) { + jmsProperties.put(PROPERTY_SECURITY_PRINCIPAL, securityPrincipal); + } if (securityCredentials != null) { jmsProperties.put(PROPERTY_SECURITY_CREDENTIALS, securityCredentials); |