diff --git a/rts/lra/client/pom.xml b/rts/lra/client/pom.xml
index f691cc0b3f..dae20bdaf4 100644
--- a/rts/lra/client/pom.xml
+++ b/rts/lra/client/pom.xml
@@ -39,34 +39,6 @@
jboss-json-api_1.0_spec
1.0.0.Final
-
- com.fasterxml.jackson.core
- jackson-databind
- ${version.jackson}
- provided
-
-
- javax.enterprise
- cdi-api
- ${version.cdi-api}
- provided
-
-
- javax.servlet
- servlet-api
- 2.5
- provided
-
-
- org.jboss.resteasy
- resteasy-json-binding-provider
- ${version.org.jboss.resteasy}
-
-
- commons-io
- commons-io
- ${version.commons-io}
-
diff --git a/rts/lra/client/src/main/java/io/narayana/lra/client/NarayanaLRAClient.java b/rts/lra/client/src/main/java/io/narayana/lra/client/NarayanaLRAClient.java
index 841f9ac8df..18af37c78e 100644
--- a/rts/lra/client/src/main/java/io/narayana/lra/client/NarayanaLRAClient.java
+++ b/rts/lra/client/src/main/java/io/narayana/lra/client/NarayanaLRAClient.java
@@ -106,13 +106,13 @@ public class NarayanaLRAClient implements Closeable {
* Key for looking up the config property that specifies which port a
* coordinator is running on
*/
- public static String LRA_COORDINATOR_PORT_KEY = "lra.http.port";
+ public static final String LRA_COORDINATOR_PORT_KEY = "lra.http.port";
/**
* Key for looking up the config property that specifies which JAX-RS path a
* coordinator is running on
*/
- public static String LRA_COORDINATOR_PATH_KEY = "lra.coordinator.path";
+ public static final String LRA_COORDINATOR_PATH_KEY = "lra.coordinator.path";
public static final long DEFAULT_TIMEOUT_MILLIS = 0L;
@@ -179,7 +179,7 @@ public NarayanaLRAClient(String scheme, String host, int port) throws URISyntaxE
*
* @param coordinatorUri uri of the lra coordinator
*/
- public NarayanaLRAClient(URI coordinatorUri) throws MalformedURLException, URISyntaxException {
+ public NarayanaLRAClient(URI coordinatorUri) {
init(coordinatorUri);
}
@@ -305,7 +305,7 @@ public URI startLRA(URI parentLRA, String clientID, Long timeout, ChronoUnit uni
response = client.target(base)
.path(START_PATH)
- .queryParam(CLIENT_ID_PARAM_NAME, client)
+ .queryParam(CLIENT_ID_PARAM_NAME, clientID)
.queryParam(TIMELIMIT_PARAM_NAME, Duration.of(timeout, unit).toMillis())
.queryParam(PARENT_LRA_PARAM_NAME, encodedParentLRA)
.request()
@@ -320,13 +320,6 @@ public URI startLRA(URI parentLRA, String clientID, Long timeout, ChronoUnit uni
}
lra = URI.create(response.getHeaderString(HttpHeaders.LOCATION));
-
- if (lra == null) {
- LRALogger.i18NLogger.error_nullLraOnCreation(response.toString());
- throwGenericLRAException(null, INTERNAL_SERVER_ERROR.getStatusCode(), "LRA creation is null");
- return null;
- }
-
lraTrace(lra, "startLRA returned");
Current.push(lra);
@@ -367,7 +360,7 @@ public void closeLRA(URI lraId) throws WebApplicationException {
/**
* @param lraId the URI of the LRA to join
- * @param timelimit how long the participant is prepared to wait for LRA completion
+ * @param timeLimit how long the participant is prepared to wait for LRA completion
* @param compensateUri URI for compensation notifications
* @param completeUri URI for completion notifications
* @param forgetUri URI for forget callback
@@ -377,10 +370,10 @@ public void closeLRA(URI lraId) throws WebApplicationException {
* @return a recovery URL for this enlistment
* @throws WebApplicationException if the LRA coordinator failed to enlist the participant
*/
- public URI joinLRA(URI lraId, Long timelimit,
+ public URI joinLRA(URI lraId, Long timeLimit,
URI compensateUri, URI completeUri, URI forgetUri, URI leaveUri, URI afterUri, URI statusUri,
String compensatorData) throws WebApplicationException {
- return enlistCompensator(lraId, timelimit, "",
+ return enlistCompensator(lraId, timeLimit, "",
compensateUri, completeUri,
forgetUri, leaveUri, afterUri, statusUri,
compensatorData);
@@ -388,7 +381,7 @@ public URI joinLRA(URI lraId, Long timelimit,
public void leaveLRA(URI lraId, String body) throws WebApplicationException {
Client client = null;
- Response response = null;
+ Response response;
try {
client = getClient();
@@ -496,7 +489,7 @@ public static boolean isAsyncCompletion(Method method) {
if (method.isAnnotationPresent(Complete.class) || method.isAnnotationPresent(Compensate.class)) {
for (Annotation[] ann : method.getParameterAnnotations()) {
for (Annotation an : ann) {
- if (Suspended.class.getName().equals(an.annotationType().getName())) {
+ if (Suspended.class.isAssignableFrom(an.annotationType())) {
LRALogger.logger.warn("JAX-RS @Suspended annotation is untested");
return true;
}
@@ -548,7 +541,7 @@ private static int checkMethod(Map paths,
public LRAStatus getStatus(URI uri) throws WebApplicationException {
Client client = null;
- Response response = null;
+ Response response;
URL lraId;
try {
@@ -641,7 +634,7 @@ private static StringBuilder makeLink(StringBuilder b, String uriPrefix, String
return b.append(link);
}
- private URI enlistCompensator(URI lraUri, long timelimit, String uriPrefix,
+ private URI enlistCompensator(URI lraUri, Long timelimit, String uriPrefix,
URI compensateUri, URI completeUri,
URI forgetUri, URI leaveUri, URI afterUri, URI statusUri,
String compensatorData) {
@@ -670,7 +663,7 @@ private URI enlistCompensator(URI lraUri, long timelimit, String uriPrefix,
return enlistCompensator(lraUri, timelimit, linkHeaderValue.toString(), compensatorData);
}
- private URI enlistCompensator(URI uri, long timelimit, String linkHeader, String compensatorData) {
+ private URI enlistCompensator(URI uri, Long timelimit, String linkHeader, String compensatorData) {
// register with the coordinator
// put the lra id in an http header
Client client = null;
@@ -687,7 +680,7 @@ private URI enlistCompensator(URI uri, long timelimit, String linkHeader, String
);
return null;
}
- if (timelimit < 0) {
+ if (timelimit == null || timelimit < 0) {
timelimit = 0L;
}
diff --git a/rts/lra/client/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder b/rts/lra/client/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder
index 2991eb511f..d2712b89e4 100644
--- a/rts/lra/client/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder
+++ b/rts/lra/client/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder
@@ -1 +1 @@
-org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder
+org.jboss.resteasy.microprofile.client.impl.MpClientBuilderImpl
diff --git a/rts/lra/jaxrs/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder b/rts/lra/jaxrs/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder
index 2991eb511f..f791ccdf03 100644
--- a/rts/lra/jaxrs/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder
+++ b/rts/lra/jaxrs/src/main/resources/META-INF/services/javax.ws.rs.client.ClientBuilder
@@ -1 +1 @@
-org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder
+org.jboss.resteasy.microprofile.client.impl.MpClientBuilderImpl
\ No newline at end of file
diff --git a/rts/lra/service-base/pom.xml b/rts/lra/service-base/pom.xml
index 250ba2aa32..2f44d965f5 100644
--- a/rts/lra/service-base/pom.xml
+++ b/rts/lra/service-base/pom.xml
@@ -19,12 +19,6 @@
${version.microprofile.lra.api}
-
- org.apache.httpcomponents
- httpclient
- ${version.apache.httpclient}
-
-
org.jboss.logging
diff --git a/rts/lra/service-base/src/main/java/io/narayana/lra/logging/lraI18NLogger.java b/rts/lra/service-base/src/main/java/io/narayana/lra/logging/lraI18NLogger.java
index 75647c9490..8b06a7c43f 100644
--- a/rts/lra/service-base/src/main/java/io/narayana/lra/logging/lraI18NLogger.java
+++ b/rts/lra/service-base/src/main/java/io/narayana/lra/logging/lraI18NLogger.java
@@ -58,10 +58,6 @@ public interface lraI18NLogger {
@Message(id = 25002, value = "LRA created with an unexpected status code: %d, coordinator response '%s'")
void error_lraCreationUnexpectedStatus(int status, String response);
- @LogMessage(level = ERROR)
- @Message(id = 25003, value = "LRA is null on creation, coordinator response '%s'")
- void error_nullLraOnCreation(String response);
-
@LogMessage(level = ERROR)
@Message(id = 25004, value = "Cannot create URL from coordinator response '%s'")
void error_cannotCreateUrlFromLCoordinatorResponse(String response, @Cause Throwable t);