From c64320a45b77eb3474f1f3f7372f1cd1f85ddfef Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 10 Feb 2021 14:01:23 +0000 Subject: 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 --- .../event/carrier/jms/JmsCarrierTechnologyParameters.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java') 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); -- cgit 1.2.3-korg