Repository: eclipse/microprofile-lra
Pull request #203 (2019-07-31 10:25:51)

The JAX-RS endpoints are defined in 'Resources' 


Patch:
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/Activity.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/Activity.java
index 3c774d0..e69aae7 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/Activity.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/Activity.java
@@ -27,7 +27,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * A simple DTO that provides information about
- * the work processed in the TCK suite controllers.
+ * the work processed in the TCK suite resources.
  */
 public class Activity implements Serializable {
     private static final long serialVersionUID = 1L;
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/ActivityStorage.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/ActivityStorage.java
index 3b1a6ae..e82825c 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/ActivityStorage.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/activity/ActivityStorage.java
@@ -30,7 +30,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * Storing activities processed by controllers during TCK suite run.
+ * Storing activities processed by resources during TCK suite run.
  */
 @ApplicationScoped
 public class ActivityStorage {
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraCancelOnController.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraCancelOnResource.java
similarity index 94%
rename from tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraCancelOnController.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraCancelOnResource.java
index af9d9b4..f5cd53b 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraCancelOnController.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraCancelOnResource.java
@@ -48,10 +48,10 @@ import org.eclipse.microprofile.lra.tck.service.LRAMetricService;
 import org.eclipse.microprofile.lra.tck.service.LRAMetricType;
 
 @ApplicationScoped
-@Path(LraCancelOnController.LRA_CANCEL_ON_CONTROLLER_PATH)
-public class LraCancelOnController {
-    private static final Logger LOGGER = Logger.getLogger(LraCancelOnController.class.getName());
-    public static final String LRA_CANCEL_ON_CONTROLLER_PATH = "lracontroller-cancelon";
+@Path(LraCancelOnResource.LRA_CANCEL_ON_RESOURCE_PATH)
+public class LraCancelOnResource {
+    private static final Logger LOGGER = Logger.getLogger(LraCancelOnResource.class.getName());
+    public static final String LRA_CANCEL_ON_RESOURCE_PATH = "lraresource-cancelon";
 
     @Inject
     private LraTckConfigBean config;
@@ -139,7 +139,7 @@ public class LraCancelOnController {
      * default for the cancelling and so the whole LRA should be cancelled.
      * </p>
      * <p>
-     * The remote REST call invokes the same controller class {@link LraCancelOnController}
+     * The remote REST call invokes the same resource class {@link LraCancelOnResource}
      * That assumes the call to the representative of the same LRA participant
      * as it's already enlisted by the method {@link #cancelFromRemoteCall(java.net.URI)} invoked by the test.
      * Because the specification mandates that the same participant can be enlisted
@@ -158,8 +158,8 @@ public class LraCancelOnController {
         try {
             Response response = client
                     .target(URI.create(new URL(config.tckSuiteBaseUrl()).toExternalForm()))
-                    .path(LRA_CANCEL_ON_CONTROLLER_PATH)
-                    .path(LraCancelOnController.CANCEL_ON_FAMILY_DEFAULT_5XX)
+                    .path(LRA_CANCEL_ON_RESOURCE_PATH)
+                    .path(LraCancelOnResource.CANCEL_ON_FAMILY_DEFAULT_5XX)
                     .request().get();
             assert response.getStatus() == 500;
         } catch (MalformedURLException murle) {
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraResource.java
similarity index 97%
rename from tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraResource.java
index ae70b5c..1f7d74d 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraController.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/LraResource.java
@@ -63,13 +63,13 @@ import static org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_CONTEXT
 import static org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_RECOVERY_HEADER;
 
 @ApplicationScoped
-@Path(LraController.LRA_CONTROLLER_PATH)
+@Path(LraResource.LRA_RESOURCE_PATH)
 @LRA(value = LRA.Type.SUPPORTS, end = false)
-public class LraController {
-    public static final String LRA_CONTROLLER_PATH = "lracontroller";
+public class LraResource {
+    public static final String LRA_RESOURCE_PATH = "lraresource";
     public static final String TRANSACTIONAL_WORK_PATH = "work";
     public static final String ACCEPT_WORK = "acceptWork";
-    private static final Logger LOGGER = Logger.getLogger(LraController.class.getName());
+    private static final Logger LOGGER = Logger.getLogger(LraResource.class.getName());
 
     static final String MANDATORY_LRA_RESOURCE_PATH = "/mandatory";
 
@@ -136,7 +136,7 @@ public class LraController {
     @Produces(MediaType.APPLICATION_JSON)
     @Complete
     public Response completeWork(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) URI lraId, String userData) {
-        lraMetricService.incrementMetric(LRAMetricType.Completed, lraId, LraController.class.getName());
+        lraMetricService.incrementMetric(LRAMetricType.Completed, lraId, LraResource.class.getName());
 
         assertHeaderPresent(lraId); // the TCK expects the coordinator to invoke @Completed methods
 
@@ -147,7 +147,7 @@ public class LraController {
         if (activity.getAndDecrementAcceptCount() > 0) {
             activity.setStatus(ParticipantStatus.Completing);
             activity.setStatusUrl(String.format("%s/%s/%s/status", context.getBaseUri(),
-                    LRA_CONTROLLER_PATH, lraId));
+                    LRA_RESOURCE_PATH, lraId));
 
             return Response.accepted().location(URI.create(activity.getStatusUrl())).build();
         }
@@ -167,7 +167,7 @@ public class LraController {
 
         assertHeaderPresent(lraId); // the TCK expects the coordinator to invoke @Compensated methods
 
-        lraMetricService.incrementMetric(LRAMetricType.Compensated, lraId, LraController.class.getName());
+        lraMetricService.incrementMetric(LRAMetricType.Compensated, lraId, LraResource.class.getName());
 
         Activity activity = activityStore.getActivityAndAssertExistence(lraId, context);
 
@@ -176,7 +176,7 @@ public class LraController {
         if (activity.getAndDecrementAcceptCount() > 0) {
             activity.setStatus(ParticipantStatus.Compensating);
             activity.setStatusUrl(String.format("%s/%s/%s/status", context.getBaseUri(),
-                    LRA_CONTROLLER_PATH, lraId));
+                    LRA_RESOURCE_PATH, lraId));
 
             return Response.accepted().location(URI.create(activity.getStatusUrl())).build();
         }
@@ -193,7 +193,7 @@ public class LraController {
     @Produces(MediaType.APPLICATION_JSON)
     @Forget
     public Response forgetWork(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) URI lraId) {
-        lraMetricService.incrementMetric(LRAMetricType.Forget, lraId, LraController.class.getName());
+        lraMetricService.incrementMetric(LRAMetricType.Forget, lraId, LraResource.class.getName());
 
         assertHeaderPresent(lraId); // the TCK expects the coordinator to invoke @Forget methods
 
@@ -213,7 +213,7 @@ public class LraController {
     }
 
     @PUT
-    @Path(LraController.ACCEPT_WORK)
+    @Path(LraResource.ACCEPT_WORK)
     @LRA(value = LRA.Type.REQUIRED, end = false)
     public Response acceptWork(
             @HeaderParam(LRA_HTTP_RECOVERY_HEADER) URI recoveryId,
@@ -293,7 +293,7 @@ public class LraController {
         String id = null;
         Response response = ClientBuilder.newClient()
                 .target(context.getBaseUri())
-                .path(LRA_CONTROLLER_PATH)
+                .path(LRA_RESOURCE_PATH)
                 .path(path)
                 .request()
                 .header(LRA_HTTP_CONTEXT_HEADER, lraURI)
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NoLRAController.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NoLRAResource.java
similarity index 91%
rename from tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NoLRAController.java
rename to tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NoLRAResource.java
index 0e9accc..89fcadf 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NoLRAController.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/NoLRAResource.java
@@ -34,12 +34,12 @@ import javax.ws.rs.core.UriInfo;
 import java.net.URI;
 
 import static org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_CONTEXT_HEADER;
-import static org.eclipse.microprofile.lra.tck.participant.api.LraController.LRA_CONTROLLER_PATH;
+import static org.eclipse.microprofile.lra.tck.participant.api.LraResource.LRA_RESOURCE_PATH;
 
 @ApplicationScoped
-@Path(NoLRAController.NO_LRA_CONTROLLER_PATH)
-public class NoLRAController {
-    public static final String NO_LRA_CONTROLLER_PATH = "nolracontroller";
+@Path(NoLRAResource.NO_LRA_RESOURCE_PATH)
+public class NoLRAResource {
+    public static final String NO_LRA_RESOURCE_PATH = "nolraresource";
     public static final String NON_TRANSACTIONAL_WORK_PATH = "work";
 
     @Context
@@ -54,8 +54,8 @@ public class NoLRAController {
         }
 
         WebTarget resourcePath = ClientBuilder.newClient().target(context.getBaseUri())
-                .path(LRA_CONTROLLER_PATH)
-                .path(LraController.MANDATORY_LRA_RESOURCE_PATH);
+                .path(LRA_RESOURCE_PATH)
+                .path(LraResource.MANDATORY_LRA_RESOURCE_PATH);
 
         Response response = resourcePath.request().put(Entity.text(""));
 


Test patch:
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckCancelOnTests.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckCancelOnTests.java
index fcc460c..a65e25e 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckCancelOnTests.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckCancelOnTests.java
@@ -19,7 +19,7 @@
  *******************************************************************************/
 package org.eclipse.microprofile.lra.tck;
 
-import org.eclipse.microprofile.lra.tck.participant.api.LraCancelOnController;
+import org.eclipse.microprofile.lra.tck.participant.api.LraCancelOnResource;
 import org.eclipse.microprofile.lra.tck.service.LRAMetricService;
 import org.eclipse.microprofile.lra.tck.service.LRAMetricType;
 import org.jboss.arquillian.container.test.api.Deployment;
@@ -35,7 +35,7 @@ import javax.ws.rs.core.Response.Status;
 
 import java.net.URI;
 
-import static org.eclipse.microprofile.lra.tck.participant.api.LraCancelOnController.LRA_CANCEL_ON_CONTROLLER_PATH;
+import static org.eclipse.microprofile.lra.tck.participant.api.LraCancelOnResource.LRA_CANCEL_ON_RESOURCE_PATH;
 import static org.junit.Assert.assertEquals;
 
 @RunWith(Arquillian.class)
@@ -54,12 +54,12 @@ public class TckCancelOnTests extends TckTestBase {
     }
 
     /**
-     * See {@link LraCancelOnController#cancelOnFamilyDefault4xx(java.net.URI)}
+     * See {@link LraCancelOnResource#cancelOnFamilyDefault4xx(java.net.URI)}
      */
     @Test
     public void cancelOnFamilyDefault4xx() {
-        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_CONTROLLER_PATH)
-            .path(LraCancelOnController.CANCEL_ON_FAMILY_DEFAULT_4XX);
+        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_RESOURCE_PATH)
+            .path(LraCancelOnResource.CANCEL_ON_FAMILY_DEFAULT_4XX);
         
         Response response = resourcePath.request().get();
 
@@ -72,12 +72,12 @@ public class TckCancelOnTests extends TckTestBase {
     }
 
     /**
-     * See {@link LraCancelOnController#cancelOnFamilyDefault5xx(java.net.URI)}
+     * See {@link LraCancelOnResource#cancelOnFamilyDefault5xx(java.net.URI)}
      */
     @Test
     public void cancelOnFamilyDefault5xx() {
-        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_CONTROLLER_PATH)
-            .path(LraCancelOnController.CANCEL_ON_FAMILY_DEFAULT_5XX);
+        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_RESOURCE_PATH)
+            .path(LraCancelOnResource.CANCEL_ON_FAMILY_DEFAULT_5XX);
         
         Response response = resourcePath.request().get();
 
@@ -90,12 +90,12 @@ public class TckCancelOnTests extends TckTestBase {
     }
 
     /**
-     * See {@link LraCancelOnController#cancelOnFamily3xx(java.net.URI)}
+     * See {@link LraCancelOnResource#cancelOnFamily3xx(java.net.URI)}
      */
     @Test
     public void cancelOnFamily3xx() {
-        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_CONTROLLER_PATH)
-            .path(LraCancelOnController.CANCEL_ON_FAMILY_3XX);
+        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_RESOURCE_PATH)
+            .path(LraCancelOnResource.CANCEL_ON_FAMILY_3XX);
         
         Response response = resourcePath.request().get();
 
@@ -108,12 +108,12 @@ public class TckCancelOnTests extends TckTestBase {
     }
 
     /**
-     * See {@link LraCancelOnController#cancelOn301(java.net.URI)}
+     * See {@link LraCancelOnResource#cancelOn301(java.net.URI)}
      */
     @Test
     public void cancelOn301() {
-        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_CONTROLLER_PATH)
-            .path(LraCancelOnController.CANCEL_ON_301);
+        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_RESOURCE_PATH)
+            .path(LraCancelOnResource.CANCEL_ON_301);
         
         Response response = resourcePath.request().get();
 
@@ -126,12 +126,12 @@ public class TckCancelOnTests extends TckTestBase {
     }
 
     /**
-     * See {@link LraCancelOnController#notCancelOnFamily5xx(java.net.URI)}
+     * See {@link LraCancelOnResource#notCancelOnFamily5xx(java.net.URI)}
      */
     @Test
     public void notCancelOnFamily5xx() {
-        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_CONTROLLER_PATH)
-            .path(LraCancelOnController.NOT_CANCEL_ON_FAMILY_5XX);
+        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_RESOURCE_PATH)
+            .path(LraCancelOnResource.NOT_CANCEL_ON_FAMILY_5XX);
         
         Response response = resourcePath.request().get();
 
@@ -144,18 +144,18 @@ public class TckCancelOnTests extends TckTestBase {
     }
 
     /**
-     * See {@link LraCancelOnController#cancelFromRemoteCall(java.net.URI)}
+     * See {@link LraCancelOnResource#cancelFromRemoteCall(java.net.URI)}
      */
     @Test
     public void cancelFromRemoteCall() {
-        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_CONTROLLER_PATH)
-            .path(LraCancelOnController.CANCEL_FROM_REMOTE_CALL);
+        WebTarget resourcePath = getSuiteTarget().path(LRA_CANCEL_ON_RESOURCE_PATH)
+            .path(LraCancelOnResource.CANCEL_FROM_REMOTE_CALL);
         
         Response response = resourcePath.request().get();
 
         URI lraId = URI.create(checkStatusReadAndCloseResponse(Status.OK, response, resourcePath));
         applyConsistencyDelay();
-        // LraCancelOnController enlists twice the same participant, compensate is expected to be called only once
+        // LraCancelOnResource enlists twice the same participant, compensate is expected to be called only once
         assertEquals("Status was 200 but compensate should be called as LRA should be cancelled for remotely called participant as well",
                 1, lraMetricService.getMetric(LRAMetricType.Compensated, lraId));
         assertEquals("Even the 200 status was received the remotely called participant should cause the LRA being cancelled",
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTestBase.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTestBase.java
index 49e2d2a..f879027 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTestBase.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTestBase.java
@@ -21,7 +21,7 @@ package org.eclipse.microprofile.lra.tck;
 
 import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
 import org.eclipse.microprofile.lra.tck.participant.activity.Activity;
-import org.eclipse.microprofile.lra.tck.participant.api.LraController;
+import org.eclipse.microprofile.lra.tck.participant.api.LraResource;
 import org.eclipse.microprofile.lra.tck.participant.api.Util;
 import org.eclipse.microprofile.lra.tck.service.LRAMetricService;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -72,7 +72,7 @@ public class TckTestBase {
             .create(WebArchive.class, archiveName + ".war")
             .addPackages(false, TckTestBase.class.getPackage(),
                 Activity.class.getPackage(),
-                LraController.class.getPackage(),
+                LraResource.class.getPackage(),
                 LRAMetricService.class.getPackage())
             .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
     }
diff --git a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
index a614d4e..c4da016 100644
--- a/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
+++ b/tck/src/main/java/org/eclipse/microprofile/lra/tck/TckTests.java
@@ -21,9 +21,9 @@ package org.eclipse.microprofile.lra.tck;
 
 import static org.eclipse.microprofile.lra.annotation.ws.rs.LRA.LRA_HTTP_CONTEXT_HEADER;
 import static org.eclipse.microprofile.lra.tck.participant.api.AfterLRAListener.AFTER_LRA_LISTENER_WORK;
-import static org.eclipse.microprofile.lra.tck.participant.api.LraController.ACCEPT_WORK;
-import static org.eclipse.microprofile.lra.tck.participant.api.LraController.LRA_CONTROLLER_PATH;
-import static org.eclipse.microprofile.lra.tck.participant.api.LraController.TRANSACTIONAL_WORK_PATH;
+import static org.eclipse.microprofile.lra.tck.participant.api.LraResource.ACCEPT_WORK;
+import static org.eclipse.microprofile.lra.tck.participant.api.LraResource.LRA_RESOURCE_PATH;
+import static org.eclipse.microprofile.lra.tck.participant.api.LraResource.TRANSACTIONAL_WORK_PATH;
 import static org.eclipse.microprofile.lra.tck.participant.api.ParticipatingTckResource.JOIN_WITH_EXISTING_LRA_PATH;
 import static org.eclipse.microprofile.lra.tck.participant.api.ParticipatingTckResource.JOIN_WITH_EXISTING_LRA_PATH2;
 import static org.eclipse.microprofile.lra.tck.participant.api.ParticipatingTckResource.TCK_PARTICIPANT_RESOURCE_PATH;
@@ -50,8 +50,8 @@ import javax.ws.rs.core.Response;
 
 import org.eclipse.microprofile.lra.annotation.AfterLRA;
 import org.eclipse.microprofile.lra.tck.participant.api.GenericLRAException;
-import org.eclipse.microprofile.lra.tck.participant.api.LraController;
-import org.eclipse.microprofile.lra.tck.participant.api.NoLRAController;
+import org.eclipse.microprofile.lra.tck.participant.api.LraResource;
+import org.eclipse.microprofile.lra.tck.participant.api.NoLRAResource;
 import org.eclipse.microprofile.lra.tck.participant.api.ParticipatingTckResource;
 import org.eclipse.microprofile.lra.tck.participant.api.AfterLRAListener;
 import org.eclipse.microprofile.lra.tck.participant.api.AfterLRAParticipant;
@@ -125,7 +125,7 @@ public class TckTests extends TckTestBase {
     public void nestedActivity() throws WebApplicationException {
         URI lra = lraClient.startLRA(null, lraClientId(), lraTimeout(), ChronoUnit.MILLIS);
         WebTarget resourcePath = tckSuiteTarget
-                .path(LRA_CONTROLLER_PATH).path("nestedActivity");
+                .path(LRA_RESOURCE_PATH).path("nestedActivity");
 
         Response response = null;
         try {
@@ -179,7 +179,7 @@ public class TckTests extends TckTestBase {
     public void joinLRAViaHeader() throws WebApplicationException {
         URI lra = lraClient.startLRA(null, lraClientId(), lraTimeout(), ChronoUnit.MILLIS);
 
-        WebTarget resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path(TRANSACTIONAL_WORK_PATH);
+        WebTarget resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path(TRANSACTIONAL_WORK_PATH);
         Response response = resourcePath
                 .request().header(LRA_HTTP_CONTEXT_HEADER, lra).put(Entity.text(""));
 
@@ -196,7 +196,7 @@ public class TckTests extends TckTestBase {
         // check that participant was told to complete
         assertEquals("Wrong completion count for call " + resourcePath.getUri() + ". Expecting the method LRA was completed "
                 + "after joining the existing LRA " + lra, 
-                1, lraMetricService.getMetric(LRAMetricType.Completed, lra, LraController.class.getName()));
+                1, lraMetricService.getMetric(LRAMetricType.Completed, lra, LraResource.class.getName()));
         
         // check that LRA coordinator no longer knows about lraId
         assertTrue("LRA '" + lra + "' should not be active anymore as it was closed yet.",
@@ -206,7 +206,7 @@ public class TckTests extends TckTestBase {
     @Test
     public void join() throws WebApplicationException {
         URI lra = lraClient.startLRA(null, lraClientId(), lraTimeout(), ChronoUnit.MILLIS);
-        WebTarget resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path(TRANSACTIONAL_WORK_PATH);
+        WebTarget resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path(TRANSACTIONAL_WORK_PATH);
         Response response = resourcePath
                 .request().header(LRA_HTTP_CONTEXT_HEADER, lra).put(Entity.text(""));
         checkStatusAndCloseResponse(Response.Status.OK, response, resourcePath);
@@ -264,18 +264,18 @@ public class TckTests extends TckTestBase {
     @Test
     public void leaveLRA() throws WebApplicationException {
         URI lra = lraClient.startLRA(null, lraClientId(), lraTimeout(), ChronoUnit.MILLIS);
-        WebTarget resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path(TRANSACTIONAL_WORK_PATH);
+        WebTarget resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path(TRANSACTIONAL_WORK_PATH);
         Response response = resourcePath.request().header(LRA_HTTP_CONTEXT_HEADER, lra).put(Entity.text(""));
 
         checkStatusAndCloseResponse(Response.Status.OK, response, resourcePath);
 
         // perform a second request to the same method in the same LRA context to validate that multiple participants are not registered
-        resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path(TRANSACTIONAL_WORK_PATH);
+        resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path(TRANSACTIONAL_WORK_PATH);
         response = resourcePath.request().header(LRA_HTTP_CONTEXT_HEADER, lra).put(Entity.text(""));
         checkStatusAndCloseResponse(Response.Status.OK, response, resourcePath);
 
         // call a method annotated with @Leave (should remove the participant from the LRA)
-        resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path("leave");
+        resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path("leave");
         response = resourcePath.request().header(LRA_HTTP_CONTEXT_HEADER, lra).put(Entity.text(""));
         checkStatusAndCloseResponse(Response.Status.OK, response, resourcePath);
 
@@ -285,14 +285,14 @@ public class TckTests extends TckTestBase {
         // check that participant was not told to complete
         assertEquals("Wrong completion count when participant left the LRA. "
                 + "Expecting the completed count hasn't change between start and end of the test. "
-                + "The test call went to LRA controller at " + resourcePath.getUri(), 
-                -1, lraMetricService.getMetric(LRAMetricType.Completed, lra, LraController.class.getName()));
+                + "The test call went to LRA resource at " + resourcePath.getUri(),
+                -1, lraMetricService.getMetric(LRAMetricType.Completed, lra, LraResource.class.getName()));
     }
 
     @Test
     public void dependentLRA() throws WebApplicationException {
         // call a method annotated with NOT_SUPPORTED but one which programmatically starts an LRA and returns it via a header
-        WebTarget resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path("startViaApi");
+        WebTarget resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path("startViaApi");
         Response response = resourcePath.request().put(Entity.text(""));
         Object lraHeader = response.getHeaders().getFirst(LRA_HTTP_CONTEXT_HEADER);
         String lraId = checkStatusReadAndCloseResponse(Response.Status.OK, response, resourcePath);
@@ -310,7 +310,7 @@ public class TckTests extends TckTestBase {
 
     @Test
     public void timeLimit() {
-        WebTarget resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path("timeLimit");
+        WebTarget resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path("timeLimit");
         Response response = resourcePath
                 .request()
                 .get();
@@ -333,21 +333,21 @@ public class TckTests extends TckTestBase {
         assertEquals("The LRA should have timed out but complete was called instead of compensate. "
                 + "Expecting the number of complete call before test matches the ones after LRA timed out. "
                 + "The test call went to " + resourcePath.getUri(), 
-                0, lraMetricService.getMetric(LRAMetricType.Completed, lraId, LraController.class.getName()));
+                0, lraMetricService.getMetric(LRAMetricType.Completed, lraId, LraResource.class.getName()));
         assertEquals("The LRA should have timed out and compensate should be called. "
                 + "Expecting the number of compensate call before test is one less lower than the ones after LRA timed out. "
                 + "The test call went to " + resourcePath.getUri(), 
-                1, lraMetricService.getMetric(LRAMetricType.Compensated, lraId, LraController.class.getName()));
+                1, lraMetricService.getMetric(LRAMetricType.Compensated, lraId, LraResource.class.getName()));
     }
 
     @Test
     public void acceptCloseTest() throws WebApplicationException, InterruptedException {
-        joinAndEnd(true, LRA_CONTROLLER_PATH, ACCEPT_WORK);
+        joinAndEnd(true, LRA_RESOURCE_PATH, ACCEPT_WORK);
     }
 
     @Test
     public void acceptCancelTest() throws WebApplicationException, InterruptedException {
-        joinAndEnd(false, LRA_CONTROLLER_PATH, ACCEPT_WORK);
+        joinAndEnd(false, LRA_RESOURCE_PATH, ACCEPT_WORK);
     }
 
     private void joinAndEnd(boolean close, String path, String path2)
@@ -369,8 +369,8 @@ public class TckTests extends TckTestBase {
         replayEndPhase(null);
         applyConsistencyDelay();
 
-        int completionCount = lraMetricService.getMetric(LRAMetricType.Completed, lra, LraController.class.getName());
-        int compensationCount = lraMetricService.getMetric(LRAMetricType.Compensated, lra, LraController.class.getName());
+        int completionCount = lraMetricService.getMetric(LRAMetricType.Completed, lra, LraResource.class.getName());
+        int compensationCount = lraMetricService.getMetric(LRAMetricType.Compensated, lra, LraResource.class.getName());
 
         boolean wasCalled = (close ? completionCount > 0 : compensationCount > 0);
         boolean wasNotCalled = (close ? compensationCount == 0 : completionCount == 0);
@@ -389,8 +389,8 @@ public class TckTests extends TckTestBase {
     @Test
     public void noLRATest() throws WebApplicationException {
         WebTarget resourcePath = tckSuiteTarget
-                .path(NoLRAController.NO_LRA_CONTROLLER_PATH)
-                .path(NoLRAController.NON_TRANSACTIONAL_WORK_PATH);
+                .path(NoLRAResource.NO_LRA_RESOURCE_PATH)
+                .path(NoLRAResource.NON_TRANSACTIONAL_WORK_PATH);
 
         URI lra = lraClient.startLRA(null, lraClientId(), lraTimeout(), ChronoUnit.MILLIS);
 
@@ -399,17 +399,17 @@ public class TckTests extends TckTestBase {
 
         String lraId = checkStatusReadAndCloseResponse(Response.Status.OK, response, resourcePath);
 
-        assertEquals("While calling non-LRA method the controller returns not expected LRA id",
+        assertEquals("While calling non-LRA method the resource returns not expected LRA id",
                 lraId, lra.toString());
 
         lraClient.cancelLRA(lra);
         applyConsistencyDelay();
 
         // check that second service (the LRA aware one), namely
-        // {@link org.eclipse.microprofile.lra.tck.participant.api.LraController#activityWithMandatoryLRA(String, String)}
+        // {@link org.eclipse.microprofile.lra.tck.participant.api.LraResource#activityWithMandatoryLRA(String, String)}
         // was told to compensate
-        int completedCount = lraMetricService.getMetric(LRAMetricType.Completed, lra, LraController.class.getName());
-        int compensatedCount = lraMetricService.getMetric(LRAMetricType.Compensated, lra, LraController.class.getName());
+        int completedCount = lraMetricService.getMetric(LRAMetricType.Completed, lra, LraResource.class.getName());
+        int compensatedCount = lraMetricService.getMetric(LRAMetricType.Compensated, lra, LraResource.class.getName());
 
         assertEquals("Completed should not be called on the LRA aware service. "
                 + "The number of completed count for before and after test does not match. "
@@ -515,7 +515,7 @@ public class TckTests extends TckTestBase {
 
     private void joinWithTwoResources(boolean close) throws WebApplicationException {
         // set up the web target for the test
-        WebTarget resource1Path = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path(TRANSACTIONAL_WORK_PATH);
+        WebTarget resource1Path = tckSuiteTarget.path(LRA_RESOURCE_PATH).path(TRANSACTIONAL_WORK_PATH);
         WebTarget resource2Path = tckSuiteTarget.path(TCK_PARTICIPANT_RESOURCE_PATH).path(JOIN_WITH_EXISTING_LRA_PATH);
 
         URI lra = lraClient.startLRA(null, lraClientId(), lraTimeout(), ChronoUnit.MILLIS);
@@ -531,20 +531,20 @@ public class TckTests extends TckTestBase {
             applyConsistencyDelay();
 
             assertTrue("joinWithTwoResourcesWithClose: both resources should have completed",
-                    lraMetricService.getMetric(LRAMetricType.Completed, lra, LraController.class.getName()) == 1 &&
+                    lraMetricService.getMetric(LRAMetricType.Completed, lra, LraResource.class.getName()) == 1 &&
                     lraMetricService.getMetric(LRAMetricType.Completed, lra, ParticipatingTckResource.class.getName()) == 1);
         } else {
             lraClient.cancelLRA(lra);
             applyConsistencyDelay();
 
             assertTrue("joinWithTwoResourcesWithCancel: both resources should have compensated",
-                    lraMetricService.getMetric(LRAMetricType.Compensated, lra, LraController.class.getName()) == 1 &&
+                    lraMetricService.getMetric(LRAMetricType.Compensated, lra, LraResource.class.getName()) == 1 &&
                     lraMetricService.getMetric(LRAMetricType.Compensated, lra, ParticipatingTckResource.class.getName()) == 1);
         }
     }
 
     private void multiLevelNestedActivity(CompletionType how, int nestedCnt) throws WebApplicationException {
-        WebTarget resourcePath = tckSuiteTarget.path(LRA_CONTROLLER_PATH).path("multiLevelNestedActivity");
+        WebTarget resourcePath = tckSuiteTarget.path(LRA_RESOURCE_PATH).path("multiLevelNestedActivity");
 
         if (how == CompletionType.mixed && nestedCnt <= 1) {
             how = CompletionType.complete;