Skip to content
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

Merged
merged 1 commit into from
Jul 31, 2019

Conversation

mmusgrov
Copy link
Contributor

#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

@mmusgrov mmusgrov requested a review from rdebusscher July 25, 2019 11:11
- 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.
Copy link
Member

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
Copy link
Member

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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applies also for @complete

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants