-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue146 Specifiy JAX-RS request methods on annotations #198
Conversation
tck/src/main/java/org/eclipse/microprofile/lra/tck/participant/api/ContextTckResource.java
Show resolved
Hide resolved
- A JAX-RS method can return a `202 Accepted` HTTP status code. | ||
If there is no `@Status` method then the response MAY provide | ||
a status URL in the `HTTP Location` header field so that the | ||
implementation can discover the final outcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, During the discussions I always had the impression that the location Header would be made available in the case when there IS @Status method available.
In this scenario, the Location Header becomes an alternative for the @Status method and reinvoking the Compensate method and makes sense.
This URL, if present, MUST obey the requirements specificed in | ||
the javadoc for the <<source-Status,Status annotation>>. | ||
If the developer has not provided an `@Status` method nor a status | ||
URL then the implementation may reinvoke the `@Compensate` method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may
? It MUST reinvoke as it otherwise has no way of retrieving the final status.
the javadoc for the <<source-Status,Status annotation>>. | ||
If the developer has not provided an `@Status` method nor a status | ||
URL then the implementation may reinvoke the `@Compensate` method | ||
(ie it MUST be idempotent). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applies also for @complete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text after the paragraph describing Compensate says:
Similarly if the resource cannot perform a completion activity immediately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've resolved everything here so @rdebusscher I will merge the PR at close of business today unless you have any further issues with it?
#146
This PR clarifies which JAX-RS request methods can be used on annotations.
@rdebusscher I added a note about including an optional status URL in
202 Accepted
responses to cover the situation where there is no@Status
method. If you accept this text then I don't think we need a new issue for it.I also did not change any text that discussed idempotency since we are still discussing that on issue #187