aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/com/att/nsa/mr/client/MRClientFactory.java6
-rw-r--r--src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java1
-rw-r--r--src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java14
4 files changed, 13 insertions, 10 deletions
diff --git a/pom.xml b/pom.xml
index d7930ff..6ea7f1c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<!-- for the client library, we want to allow 1.6 or later -->
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
- <jersey.version>2.26</jersey.version>
+ <jersey.version>2.22.1</jersey.version>
<version.jackson.core>2.6.7.1</version.jackson.core>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java b/src/main/java/com/att/nsa/mr/client/MRClientFactory.java
index 97aa0b8..a51e7eb 100644
--- a/src/main/java/com/att/nsa/mr/client/MRClientFactory.java
+++ b/src/main/java/com/att/nsa/mr/client/MRClientFactory.java
@@ -657,11 +657,13 @@ public class MRClientFactory {
sub.setUsername(props.getProperty("username"));
sub.setPassword(props.getProperty("password"));
}
- sub.setRouterFilePath(props.getProperty("DME2preferredRouterFilePath"));
+
sub.setProps(props);
sub.setHost(props.getProperty("host"));
sub.setProtocolFlag(props.getProperty("TransportType"));
sub.setfFilter(props.getProperty("filter"));
+ if (props.getProperty("TransportType").equalsIgnoreCase(ProtocolTypeConstants.DME2.getValue())) {
+ sub.setRouterFilePath(props.getProperty("DME2preferredRouterFilePath"));
routeFilePath = props.getProperty("DME2preferredRouterFilePath");
routeReader = new FileReader(new File(routeFilePath));
prop = new Properties();
@@ -669,6 +671,8 @@ public class MRClientFactory {
if (!fo.exists()) {
routeWriter = new FileWriter(new File(routeFilePath));
}
+ }
+
return sub;
}
}
diff --git a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java b/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
index 8509042..4f44d30 100644
--- a/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
+++ b/src/main/java/com/att/nsa/mr/client/impl/MRSimplerBatchPublisher.java
@@ -864,6 +864,7 @@ public class MRSimplerBatchPublisher extends MRBaseClient implements MRBatchingP
send(false);
}
}, 100, threadOccuranceTime, TimeUnit.MILLISECONDS);
+ pubResponse = new MRPublisherResponse();
}
private static class TimestampedMessage extends message {
diff --git a/src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java b/src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java
index 900c932..1b8cd47 100644
--- a/src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java
+++ b/src/main/java/com/att/nsa/mr/tools/ValidatorUtil.java
@@ -64,10 +64,6 @@ public class ValidatorUtil {
if (id == null || id.isEmpty()) {
throw new IllegalArgumentException ( "Consumer (Id) is needed" );
}
- String sessionstickinessrequired = props.getProperty("sessionstickinessrequired");
- if (sessionstickinessrequired == null || sessionstickinessrequired.isEmpty()) {
- throw new IllegalArgumentException ( "sessionstickinessrequired is needed" );
- }
}
private static void validateForDME2(Properties props) {
@@ -132,6 +128,10 @@ public class ValidatorUtil {
if (subContextPath == null || subContextPath.isEmpty()) {
throw new IllegalArgumentException ( "SubContextPath is needed" );
}
+ String sessionstickinessrequired = props.getProperty("sessionstickinessrequired");
+ if (sessionstickinessrequired == null || sessionstickinessrequired.isEmpty()) {
+ throw new IllegalArgumentException ( "sessionstickinessrequired is needed" );
+ }
}
private static void validateForNonDME2(Properties props) {
@@ -144,14 +144,11 @@ public class ValidatorUtil {
if (topic == null || topic.isEmpty()) {
throw new IllegalArgumentException ( "topic is needed" );
}
- String methodType = props.getProperty("MethodType");
- if (methodType == null || methodType.isEmpty()) {
- throw new IllegalArgumentException ( "MethodType is needed" );
- }
String contenttype = props.getProperty("contenttype");
if (contenttype == null || contenttype.isEmpty()) {
throw new IllegalArgumentException ( "contenttype is needed" );
}
+ if (!ProtocolTypeConstants.HTTPNOAUTH.getValue().equalsIgnoreCase(transportType)){
String username = props.getProperty("username");
if (username == null || username.isEmpty()) {
throw new IllegalArgumentException ( "username is needed" );
@@ -160,6 +157,7 @@ public class ValidatorUtil {
if (password == null || password.isEmpty()) {
throw new IllegalArgumentException ( "password is needed" );
}
+ }
if (ProtocolTypeConstants.AUTH_KEY.getValue().equalsIgnoreCase(transportType)) {
String authKey = props.getProperty("authKey");
if (authKey == null || authKey.isEmpty()) {