Skip to content

Commit 5775670

Browse files
authored
Merge pull request #356 from xstefank/move-to-mp-parent
Move to the MicroProfile parent
2 parents 31cdaca + 994abd5 commit 5775670

File tree

79 files changed

+1836
-2644
lines changed

Some content is hidden

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

79 files changed

+1836
-2644
lines changed

Diff for: .editorconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ insert_final_newline = true
1515
[*.md]
1616
trim_trailing_whitespace = false
1717

18-
[*.adoc]
19-
trim_trailing_whitespace = false
18+
[*.asciidoc]
19+
trim_trailing_whitespace = false

Diff for: NOTICE

+2
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ Michael Musgrove [email protected]
1717
Nicola Ferraro [email protected]
1818
Ondra Chaloupka [email protected]
1919
Tom Jenkinson [email protected]
20+
Martin Stefanko [email protected]
21+
Rudy De Busscher [email protected]
2022
</text>

Diff for: api/NOTICE

+2
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ Michael Musgrove [email protected]
1717
Nicola Ferraro [email protected]
1818
Ondra Chaloupka [email protected]
1919
Tom Jenkinson [email protected]
20+
Martin Stefanko [email protected]
21+
Rudy De Busscher [email protected]
2022
</text>

Diff for: api/pom.xml

+6-126
Original file line numberDiff line numberDiff line change
@@ -26,144 +26,24 @@
2626

2727
<artifactId>microprofile-lra-api</artifactId>
2828
<name>MicroProfile LRA API</name>
29-
<description>Eclipse MicroProfile LRA Feature - API</description>
30-
31-
<properties>
32-
<version.jaxrs-api>2.1</version.jaxrs-api>
33-
<version.cdi-api>1.0-SP1</version.cdi-api>
34-
</properties>
29+
<description>Eclipse MicroProfile LRA - API</description>
3530

3631
<dependencies>
3732
<dependency>
3833
<groupId>jakarta.ws.rs</groupId>
3934
<artifactId>jakarta.ws.rs-api</artifactId>
40-
<scope>provided</scope>
4135
</dependency>
4236
<dependency>
4337
<groupId>jakarta.enterprise</groupId>
4438
<artifactId>jakarta.enterprise.cdi-api</artifactId>
45-
<scope>provided</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>biz.aQute.bnd</groupId>
42+
<artifactId>biz.aQute.bnd.annotation</artifactId>
4643
</dependency>
4744
<dependency>
4845
<groupId>org.osgi</groupId>
49-
<artifactId>org.osgi.annotation.versioning</artifactId>
50-
<version>1.0.0</version>
51-
<scope>provided</scope>
46+
<artifactId>org.osgi.service.cdi</artifactId>
5247
</dependency>
5348
</dependencies>
54-
55-
<build>
56-
<plugins>
57-
<plugin>
58-
<artifactId>maven-resources-plugin</artifactId>
59-
<executions>
60-
<execution>
61-
<id>copy-resources</id>
62-
<phase>validate</phase>
63-
<goals>
64-
<goal>copy-resources</goal>
65-
</goals>
66-
<configuration>
67-
<outputDirectory>${basedir}/target/apidocs/doc-files/</outputDirectory>
68-
<overwrite>true</overwrite>
69-
<resources>
70-
<resource>
71-
<directory>src/main/javadoc/licenses/${revremark}/</directory>
72-
<filtering>true</filtering>
73-
</resource>
74-
</resources>
75-
</configuration>
76-
</execution>
77-
</executions>
78-
</plugin>
79-
<plugin>
80-
<groupId>org.apache.maven.plugins</groupId>
81-
<artifactId>maven-javadoc-plugin</artifactId>
82-
<configuration>
83-
<failOnError>false</failOnError>
84-
<additionalparam>${javadoc.options}</additionalparam>
85-
<docfilessubdirs>true</docfilessubdirs>
86-
<attach>true</attach>
87-
<doclint>none</doclint>
88-
<doctitle>${project.name}</doctitle>
89-
<windowtitle>${project.name}</windowtitle>
90-
<header><![CDATA[<br>${project.name} v${project.version}]]></header>
91-
<bottom>
92-
<![CDATA[
93-
Copyright &#169; ${inceptionYear} &#x2013; {currentYear} {organizationName}. All rights reserved.
94-
<br>
95-
Use is subject to <a href="{@docRoot}/doc-files/license.html" target="_top">license terms</a>.
96-
]]>
97-
</bottom>
98-
<tags>
99-
<tag>
100-
<name>implSpec</name>
101-
<placement>a</placement>
102-
<head>Implementation Specification:</head>
103-
</tag>
104-
</tags>
105-
</configuration>
106-
<executions>
107-
<execution>
108-
<id>attach-javadocs</id>
109-
<goals>
110-
<goal>jar</goal>
111-
</goals>
112-
</execution>
113-
</executions>
114-
</plugin>
115-
<plugin>
116-
<groupId>org.apache.maven.plugins</groupId>
117-
<artifactId>maven-source-plugin</artifactId>
118-
<executions>
119-
<execution>
120-
<id>attach-sources</id>
121-
<goals>
122-
<goal>jar</goal>
123-
</goals>
124-
</execution>
125-
</executions>
126-
</plugin>
127-
<plugin>
128-
<groupId>biz.aQute.bnd</groupId>
129-
<artifactId>bnd-maven-plugin</artifactId>
130-
<executions>
131-
<execution>
132-
<goals>
133-
<goal>bnd-process</goal>
134-
</goals>
135-
</execution>
136-
</executions>
137-
</plugin>
138-
<plugin>
139-
<groupId>org.apache.maven.plugins</groupId>
140-
<artifactId>maven-jar-plugin</artifactId>
141-
<configuration>
142-
<Bundle-SymbolicName>org.eclipse.microprofile.lra</Bundle-SymbolicName>
143-
<Bundle-Name>MicroProfile LRA bundle</Bundle-Name>
144-
<archive>
145-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
146-
</archive>
147-
</configuration>
148-
</plugin>
149-
<!-- Uncomment once the 1.0 is released-->
150-
<!-- <plugin>-->
151-
<!-- <groupId>biz.aQute.bnd</groupId>-->
152-
<!-- <artifactId>bnd-baseline-maven-plugin</artifactId>-->
153-
<!-- <configuration>-->
154-
<!-- <base>-->
155-
<!-- <version>1.0</version>-->
156-
<!-- </base>-->
157-
<!-- </configuration>-->
158-
<!-- <executions>-->
159-
<!-- <execution>-->
160-
<!-- <id>baseline</id>-->
161-
<!-- <goals>-->
162-
<!-- <goal>baseline</goal>-->
163-
<!-- </goals>-->
164-
<!-- </execution>-->
165-
<!-- </executions>-->
166-
<!-- </plugin>-->
167-
</plugins>
168-
</build>
16949
</project>

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
*/
2929
public final class LRAResponse {
3030

31-
private LRAResponse() {}
31+
private LRAResponse() {
32+
}
3233

3334
public static Response compensated() {
3435
return Builder.compensated().build();

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

+24-39
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,37 @@
1919
*******************************************************************************/
2020
package org.eclipse.microprofile.lra.annotation;
2121

22-
import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
23-
2422
import java.lang.annotation.ElementType;
2523
import java.lang.annotation.Retention;
2624
import java.lang.annotation.RetentionPolicy;
2725
import java.lang.annotation.Target;
2826

27+
import org.eclipse.microprofile.lra.annotation.ws.rs.LRA;
28+
2929
/**
3030
* <p>
31-
* If a JAX-RS resource method is annotated with
32-
* {@link LRA} and is invoked in the context of an LRA then
33-
* the resource can ask to be notified when the LRA finishes
34-
* by marking one of the other methods in the class with
35-
* the <code>&#64;AfterLRA</code> annotation.
31+
* If a JAX-RS resource method is annotated with {@link LRA} and is invoked in the context of an LRA then the resource
32+
* can ask to be notified when the LRA finishes by marking one of the other methods in the class with the
33+
* <code>&#64;AfterLRA</code> annotation.
3634
* </p>
3735
*
3836
* <p>
39-
* The listener can register interest in the final outcome of an LRA at
40-
* any time up until the LRA has reached a final state. In other words,
41-
* if an LRA is closing or cancelling then listener registrations
42-
* should be allowed. This is in contrast to registering for participant
43-
* callbacks which are only allowed if the LRA is active.
44-
* A consequence of this statement is that if a class is annotated with
45-
* both the <code>AfterLRA</code> and the {@link Compensate} annotations and the LRA has
46-
* already started closing or cancelling then the {@link LRA} method invocation
47-
* will fail with a <code>412 Precondition Failed</code> JAX-RS response
48-
* code because the {@link Compensate} method requires LRA to be Active. Without
49-
* the {@link Compensate} method present, the after LRA listener would be registered successfully.
37+
* The listener can register interest in the final outcome of an LRA at any time up until the LRA has reached a final
38+
* state. In other words, if an LRA is closing or cancelling then listener registrations should be allowed. This is in
39+
* contrast to registering for participant callbacks which are only allowed if the LRA is active. A consequence of this
40+
* statement is that if a class is annotated with both the <code>AfterLRA</code> and the {@link Compensate} annotations
41+
* and the LRA has already started closing or cancelling then the {@link LRA} method invocation will fail with a
42+
* <code>412 Precondition Failed</code> JAX-RS response code because the {@link Compensate} method requires LRA to be
43+
* Active. Without the {@link Compensate} method present, the after LRA listener would be registered successfully.
5044
* </p>
5145
*
5246
* <p>
53-
* If the <code>AfterLRA</code> method is also a JAX-RS resource method
54-
* then it MUST use the {@link javax.ws.rs.PUT} request method. In this
55-
* case, the LRA context is made available to the annotated method
56-
* via an HTTP header with the name
57-
* {@link LRA#LRA_HTTP_ENDED_CONTEXT_HEADER} and the
58-
* final status is passed to the method as plain text
59-
* corresponding to one of the {@link LRAStatus} enum values.
60-
* If this LRA was nested then the parent LRA MUST be present in the header
61-
* {@link org.eclipse.microprofile.lra.annotation.ws.rs.LRA#LRA_HTTP_PARENT_CONTEXT_HEADER}
62-
* and value is of type {@link java.net.URI}. For example:
47+
* If the <code>AfterLRA</code> method is also a JAX-RS resource method then it MUST use the {@link javax.ws.rs.PUT}
48+
* request method. In this case, the LRA context is made available to the annotated method via an HTTP header with the
49+
* name {@link LRA#LRA_HTTP_ENDED_CONTEXT_HEADER} and the final status is passed to the method as plain text
50+
* corresponding to one of the {@link LRAStatus} enum values. If this LRA was nested then the parent LRA MUST be present
51+
* in the header {@link org.eclipse.microprofile.lra.annotation.ws.rs.LRA#LRA_HTTP_PARENT_CONTEXT_HEADER} and value is
52+
* of type {@link java.net.URI}. For example:
6353
* </p>
6454
*
6555
* <pre>
@@ -73,18 +63,14 @@
7363
* </pre>
7464
*
7565
* <p>
76-
* The implementation SHOULD keep resending the notification
77-
* until it receives a <code>200 OK</code> status code from the
78-
* resource method (which means that the method SHOULD be
79-
* idempotent).
80-
* If it stops retrying a warning message SHOULD be logged.
66+
* The implementation SHOULD keep resending the notification until it receives a <code>200 OK</code> status code from
67+
* the resource method (which means that the method SHOULD be idempotent). If it stops retrying a warning message SHOULD
68+
* be logged.
8169
* </p>
8270
*
8371
* <p>
84-
* If the <code>AfterLRA</code> method is not a JAX-RS resource method
85-
* then the id of the LRA and its final status can be obtained
86-
* by ensuring that the annotated method conforms to the
87-
* signature:
72+
* If the <code>AfterLRA</code> method is not a JAX-RS resource method then the id of the LRA and its final status can
73+
* be obtained by ensuring that the annotated method conforms to the signature:
8874
* </p>
8975
*
9076
* <pre>
@@ -94,8 +80,7 @@
9480
* </pre>
9581
*
9682
* <p>
97-
* The return type is ignored and the method name is not
98-
* significant.
83+
* The return type is ignored and the method name is not significant.
9984
* </p>
10085
*/
10186
@Retention(RetentionPolicy.RUNTIME)

0 commit comments

Comments
 (0)