Skip to content

Commit 6798de2

Browse files
authored
Merge pull request #357 from xstefank/issue-351-jakarta-rename
Align with Jakarta EE 9.1 dependencies
2 parents 5775670 + 2533c8a commit 6798de2

File tree

59 files changed

+343
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+343
-342
lines changed

Diff for: api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<!-- This is just for now and will not work if the API has a separate release cycle than the rest. -->
2222
<groupId>org.eclipse.microprofile.lra</groupId>
2323
<artifactId>microprofile-lra-parent</artifactId>
24-
<version>1.1-SNAPSHOT</version>
24+
<version>2.0-SNAPSHOT</version>
2525
</parent>
2626

2727
<artifactId>microprofile-lra-api</artifactId>

Diff for: api/src/main/java/org/eclipse/microprofile/lra/LRAResponse.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020

2121
package org.eclipse.microprofile.lra;
2222

23-
import javax.ws.rs.core.Response;
23+
import jakarta.ws.rs.core.Response;
2424

2525
/**
26-
* The utility class that will create the correct {@link Response} or {@link javax.ws.rs.core.Response.ResponseBuilder}
27-
* for the response that should be returned from the LRA JAX-RS methods.
26+
* The utility class that will create the correct {@link Response} or
27+
* {@link jakarta.ws.rs.core.Response.ResponseBuilder} for the response that should be returned from the LRA JAX-RS
28+
* methods.
2829
*/
2930
public final class LRAResponse {
3031

Diff for: api/src/main/java/org/eclipse/microprofile/lra/annotation/AfterLRA.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* </p>
4545
*
4646
* <p>
47-
* If the <code>AfterLRA</code> method is also a JAX-RS resource method then it MUST use the {@link javax.ws.rs.PUT}
47+
* If the <code>AfterLRA</code> method is also a JAX-RS resource method then it MUST use the {@link jakarta.ws.rs.PUT}
4848
* request method. In this case, the LRA context is made available to the annotated method via an HTTP header with the
4949
* name {@link LRA#LRA_HTTP_ENDED_CONTEXT_HEADER} and the final status is passed to the method as plain text
5050
* corresponding to one of the {@link LRAStatus} enum values. If this LRA was nested then the parent LRA MUST be present

Diff for: api/src/main/java/org/eclipse/microprofile/lra/annotation/Compensate.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
* </p>
4444
*
4545
* <p>
46-
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link javax.ws.rs.PUT}. The
47-
* LRA context of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA is
48-
* nested then the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and
49-
* the header value will be of type {@link java.net.URI}.
46+
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link jakarta.ws.rs.PUT}.
47+
* The LRA context of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA
48+
* is nested then the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER}
49+
* and the header value will be of type {@link java.net.URI}.
5050
* </p>
5151
*
5252
* <p>
@@ -86,7 +86,7 @@
8686
*
8787
* <p>
8888
* If the method is a JAX-RS resource method (or is a non JAX-RS method annotated with <code>&#64;Compensate</code> with
89-
* return type <code>javax.ws.rs.core.Response</code>) then the following are the only valid response codes:
89+
* return type <code>jakarta.ws.rs.core.Response</code>) then the following are the only valid response codes:
9090
* </p>
9191
*
9292
* <table border="0" cellpadding="3" cellspacing="0" summary="Valid JAX-RS compensation response codes">

Diff for: api/src/main/java/org/eclipse/microprofile/lra/annotation/Complete.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
* </p>
4545
*
4646
* <p>
47-
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link javax.ws.rs.PUT}. The
48-
* id of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA is nested then
49-
* the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and the header
50-
* value will be of type {@link java.net.URI}.
47+
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link jakarta.ws.rs.PUT}.
48+
* The id of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA is nested
49+
* then the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and the
50+
* header value will be of type {@link java.net.URI}.
5151
* </p>
5252
*
5353
* <p>
@@ -85,7 +85,7 @@
8585
*
8686
* <p>
8787
* If the method is a JAX-RS resource method (or is a non JAX-RS method annotated with <code>&#64;Complete</code> with
88-
* return type <code>javax.ws.rs.core.Response</code>) then the following are the only valid response codes:
88+
* return type <code>jakarta.ws.rs.core.Response</code>) then the following are the only valid response codes:
8989
* </p>
9090
*
9191
* <table border="0" cellpadding="3" cellspacing="0" summary="Valid JAX-RS completion response codes">

Diff for: api/src/main/java/org/eclipse/microprofile/lra/annotation/Forget.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
* </p>
4444
*
4545
* <p>
46-
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link javax.ws.rs.DELETE}.
47-
* The context of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA is
48-
* nested then the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and
49-
* value is of type {@link java.net.URI}.
46+
* If the annotation is applied to a JAX-RS resource method then the request method MUST be
47+
* {@link jakarta.ws.rs.DELETE}. The context of the currently running LRA can be obtained by inspecting the incoming
48+
* JAX-RS headers. If this LRA is nested then the parent LRA MUST be present in the header with the name
49+
* {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and value is of type {@link java.net.URI}.
5050
* </p>
5151
*
5252
* <p>
@@ -77,7 +77,7 @@
7777
* </p>
7878
* <p>
7979
* If the method is a JAX-RS resource method (or is a non JAX-RS method annotated with <code>&#64;Forget</code> with
80-
* return type <code>javax.ws.rs.core.Response</code>) then the following are the only valid response codes:
80+
* return type <code>jakarta.ws.rs.core.Response</code>) then the following are the only valid response codes:
8181
* </p>
8282
*
8383
* <table border="0" cellpadding="3" cellspacing="0" summary="Valid JAX-RS response codes for Forget methods">

Diff for: api/src/main/java/org/eclipse/microprofile/lra/annotation/Status.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
import java.lang.annotation.RetentionPolicy;
2626
import java.lang.annotation.Target;
2727

28-
import javax.ws.rs.core.Response;
29-
3028
import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
3129

30+
import jakarta.ws.rs.core.Response;
31+
3232
/**
3333
* <p>
3434
* The LRA specification supports distributed communications amongst software components and due to the unreliable
@@ -41,10 +41,10 @@
4141
* </p>
4242
*
4343
* <p>
44-
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link javax.ws.rs.GET}. The
45-
* context of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA is nested
46-
* then the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and value
47-
* is of type {@link java.net.URI}.
44+
* If the annotation is applied to a JAX-RS resource method then the request method MUST be {@link jakarta.ws.rs.GET}.
45+
* The context of the currently running LRA can be obtained by inspecting the incoming JAX-RS headers. If this LRA is
46+
* nested then the parent LRA MUST be present in the header with the name {@link LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and
47+
* value is of type {@link java.net.URI}.
4848
* </p>
4949
*
5050
* <p>

Diff for: api/src/main/java/org/eclipse/microprofile/lra/annotation/ws/rs/LRA.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
import java.lang.annotation.Target;
2828
import java.time.temporal.ChronoUnit;
2929

30-
import javax.ws.rs.HeaderParam;
31-
import javax.ws.rs.core.Response;
32-
3330
import org.eclipse.microprofile.lra.annotation.AfterLRA;
3431
import org.eclipse.microprofile.lra.annotation.Compensate;
3532
import org.eclipse.microprofile.lra.annotation.Complete;
3633
import org.eclipse.microprofile.lra.annotation.Forget;
3734
import org.eclipse.microprofile.lra.annotation.LRAStatus;
3835
import org.eclipse.microprofile.lra.annotation.Status;
3936

37+
import jakarta.ws.rs.HeaderParam;
38+
import jakarta.ws.rs.core.Response;
39+
4040
/**
4141
* <p>
4242
* An annotation for controlling the lifecycle of Long Running Actions (LRAs).
@@ -363,7 +363,7 @@ enum Type {
363363
* via a JAX-RS exception mappper.
364364
* </p>
365365
*
366-
* @return the {@link javax.ws.rs.core.Response.Status.Family} status families that will cause cancellation of the
366+
* @return the {@link jakarta.ws.rs.core.Response.Status.Family} status families that will cause cancellation of the
367367
* LRA
368368
*/
369369
Response.Status.Family[] cancelOnFamily() default {
@@ -384,7 +384,7 @@ Response.Status.Family[] cancelOnFamily() default {
384384
* or via a JAX-RS exception mappper.
385385
* </p>
386386
*
387-
* @return the {@link javax.ws.rs.core.Response.Status} HTTP status codes that will cause cancellation of the LRA
387+
* @return the {@link jakarta.ws.rs.core.Response.Status} HTTP status codes that will cause cancellation of the LRA
388388
*/
389389
Response.Status[] cancelOn() default {};
390390
}

Diff for: api/src/main/java/org/eclipse/microprofile/lra/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
* Microprofile LRA Support.
2424
*/
2525

26-
@org.osgi.annotation.versioning.Version("1.0")
26+
@org.osgi.annotation.versioning.Version("2.0")
2727
package org.eclipse.microprofile.lra;

Diff for: pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
<parent>
2121
<groupId>org.eclipse.microprofile</groupId>
2222
<artifactId>microprofile-parent</artifactId>
23-
<version>1.3</version>
23+
<version>2.4</version>
2424
</parent>
2525

2626
<groupId>org.eclipse.microprofile.lra</groupId>
2727
<artifactId>microprofile-lra-parent</artifactId>
2828
<name>MicroProfile Long Running Actions</name>
29-
<version>1.1-SNAPSHOT</version>
29+
<version>2.0-SNAPSHOT</version>
3030
<description>Eclipse MicroProfile LRA - Parent POM</description>
3131
<packaging>pom</packaging>
3232

Diff for: spec/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- This is just for now and will not work if the API has a separate release cycle than the rest. -->
2121
<groupId>org.eclipse.microprofile.lra</groupId>
2222
<artifactId>microprofile-lra-parent</artifactId>
23-
<version>1.1-SNAPSHOT</version>
23+
<version>2.0-SNAPSHOT</version>
2424
</parent>
2525

2626
<groupId>org.eclipse.microprofile.lra</groupId>

Diff for: spec/src/main/asciidoc/microprofile-lra-spec.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ MUST adhere to these predefined signatures:
10411041
error execution is handled by <<non-jax-rs-exceptions, exceptions>> thrown in the participant method
10421042
*** not applicable for `@Status` participant methods
10431043
** <<source-ParticipantStatus,ParticipantStatus>>
1044-
** `javax.ws.rs.core.Response`: handled similarly as for
1044+
** `jakarta.ws.rs.core.Response`: handled similarly as for
10451045
<<jaxrs-participant-methods, JAX-RS participant methods>>
10461046
** `java.util.concurrent.CompletionStage`: with the parameter of any of the previously
10471047
defined types
@@ -1131,7 +1131,7 @@ immediately the `@Compensate` method MUST report that the activity
11311131
is still in progress using one of the following options:
11321132

11331133
- Return a `CompletionStage` or mark the method as asynchronous
1134-
(using the `javax.ws.rs.container.Suspended` annotation). The future must
1134+
(using the `jakarta.ws.rs.container.Suspended` annotation). The future must
11351135
report the final status when the stage completes (if it delivers an
11361136
intermediate state then the implementation MUST use the `@Status` method if
11371137
it exists, and if there is no such method it will reinvoke the `@Compensate`

Diff for: tck/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.eclipse.microprofile.lra</groupId>
2222
<artifactId>microprofile-lra-parent</artifactId>
23-
<version>1.1-SNAPSHOT</version>
23+
<version>2.0-SNAPSHOT</version>
2424
</parent>
2525

2626
<artifactId>microprofile-lra-tck</artifactId>

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/JaxRsActivator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*******************************************************************************/
2020
package org.eclipse.microprofile.lra.tck;
2121

22-
import javax.ws.rs.ApplicationPath;
23-
import javax.ws.rs.core.Application;
22+
import jakarta.ws.rs.ApplicationPath;
23+
import jakarta.ws.rs.core.Application;
2424

2525
@ApplicationPath("/")
2626
public class JaxRsActivator extends Application {

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/LRAClientOps.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
import java.util.concurrent.TimeUnit;
3737
import java.util.logging.Logger;
3838

39-
import javax.ws.rs.client.Entity;
40-
import javax.ws.rs.client.Invocation;
41-
import javax.ws.rs.client.WebTarget;
42-
import javax.ws.rs.core.Response;
43-
4439
import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
4540
import org.eclipse.microprofile.lra.tck.participant.api.GenericLRAException;
4641

42+
import jakarta.ws.rs.client.Entity;
43+
import jakarta.ws.rs.client.Invocation;
44+
import jakarta.ws.rs.client.WebTarget;
45+
import jakarta.ws.rs.core.Response;
46+
4747
public class LRAClientOps {
4848
private static final Logger LOGGER = Logger.getLogger(TckLRATypeTests.class.getName());
4949

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/LraTckConfigBean.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
package org.eclipse.microprofile.lra.tck;
2222

23-
import javax.enterprise.context.ApplicationScoped;
24-
import javax.inject.Inject;
25-
2623
import org.eclipse.microprofile.config.inject.ConfigProperty;
2724

25+
import jakarta.enterprise.context.ApplicationScoped;
26+
import jakarta.inject.Inject;
27+
2828
@ApplicationScoped
2929
public class LraTckConfigBean {
3030

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/TckCancelOnTests.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323

2424
import java.net.URI;
2525

26-
import javax.inject.Inject;
27-
import javax.ws.rs.client.WebTarget;
28-
import javax.ws.rs.core.Response;
29-
import javax.ws.rs.core.Response.Status;
30-
3126
import org.eclipse.microprofile.lra.tck.participant.api.LraCancelOnResource;
3227
import org.eclipse.microprofile.lra.tck.service.LRAMetricAssertions;
3328
import org.eclipse.microprofile.lra.tck.service.LRATestService;
@@ -37,6 +32,11 @@
3732
import org.junit.Test;
3833
import org.junit.runner.RunWith;
3934

35+
import jakarta.inject.Inject;
36+
import jakarta.ws.rs.client.WebTarget;
37+
import jakarta.ws.rs.core.Response;
38+
import jakarta.ws.rs.core.Response.Status;
39+
4040
@RunWith(Arquillian.class)
4141
public class TckCancelOnTests extends TckTestBase {
4242

@@ -148,7 +148,7 @@ public void notCancelOnFamily5xx() {
148148
}
149149

150150
/**
151-
* See {@link LraCancelOnResource#cancelFromRemoteCall(java.net.URI, javax.ws.rs.core.UriInfo)}
151+
* See {@link LraCancelOnResource#cancelFromRemoteCall(java.net.URI, jakarta.ws.rs.core.UriInfo)}
152152
*/
153153
@Test
154154
public void cancelFromRemoteCall() {

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/TckContextTests.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@
4343

4444
import java.net.URI;
4545

46-
import javax.inject.Inject;
47-
import javax.ws.rs.client.Entity;
48-
import javax.ws.rs.client.Invocation;
49-
import javax.ws.rs.client.WebTarget;
50-
import javax.ws.rs.core.Response;
51-
5246
import org.eclipse.microprofile.lra.annotation.ParticipantStatus;
5347
import org.eclipse.microprofile.lra.tck.participant.api.AfterLRAListener;
5448
import org.eclipse.microprofile.lra.tck.participant.api.ContextTckResource;
@@ -65,6 +59,12 @@
6559
import org.junit.Test;
6660
import org.junit.runner.RunWith;
6761

62+
import jakarta.inject.Inject;
63+
import jakarta.ws.rs.client.Entity;
64+
import jakarta.ws.rs.client.Invocation;
65+
import jakarta.ws.rs.client.WebTarget;
66+
import jakarta.ws.rs.core.Response;
67+
6868
/**
6969
* test that Compensate, Complete, Status, Forget and Leave annotations work without an LRA annotation test that
7070
* resource methods that make outgoing requests do not modify the current context when they return

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/TckLRATypeTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
import java.time.temporal.ChronoUnit;
3232
import java.util.logging.Logger;
3333

34-
import javax.ws.rs.client.Invocation;
35-
import javax.ws.rs.core.Response;
36-
3734
import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
3835
import org.eclipse.microprofile.lra.tck.participant.api.LRATypeTckInterface;
3936
import org.eclipse.microprofile.lra.tck.participant.api.LRATypeTckResource;
@@ -45,6 +42,9 @@
4542
import org.junit.Test;
4643
import org.junit.runner.RunWith;
4744

45+
import jakarta.ws.rs.client.Invocation;
46+
import jakarta.ws.rs.core.Response;
47+
4848
/**
4949
* <p>
5050
* Tests that validate that the implementation of the {@link LRA.Type} attribute is correct

Diff for: tck/src/main/java/org/eclipse/microprofile/lra/tck/TckParticipantTests.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
import java.util.concurrent.TimeoutException;
2828
import java.util.logging.Logger;
2929

30-
import javax.inject.Inject;
31-
import javax.ws.rs.WebApplicationException;
32-
import javax.ws.rs.client.Entity;
33-
import javax.ws.rs.client.WebTarget;
34-
import javax.ws.rs.core.Response;
35-
3630
import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
3731
import org.eclipse.microprofile.lra.tck.participant.nonjaxrs.valid.LongBusinessMethodParticipant;
3832
import org.eclipse.microprofile.lra.tck.participant.nonjaxrs.valid.ValidLRACSParticipant;
@@ -46,6 +40,12 @@
4640
import org.junit.Test;
4741
import org.junit.runner.RunWith;
4842

43+
import jakarta.inject.Inject;
44+
import jakarta.ws.rs.WebApplicationException;
45+
import jakarta.ws.rs.client.Entity;
46+
import jakarta.ws.rs.client.WebTarget;
47+
import jakarta.ws.rs.core.Response;
48+
4949
/**
5050
* TCK to verify that valid non-JAX-RS participant method signatures are respected
5151
*/

0 commit comments

Comments
 (0)