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

Allow String parameters as parameter type for Complete and Compensate Methods in the non JAX-RS case #160

Closed
rdebusscher opened this issue Jun 5, 2019 · 3 comments
Assignees
Milestone

Comments

@rdebusscher
Copy link
Member

Through Issue #35 (PR #148) the only allowed parameter type on the Complete and Compensate Methods is java/net.URI

@Compensate
public void compensateAction(URI lraId) {

However, in the JAX-RS version, the most common parameter types will be String.

@PUT
@Path("/compensate")
@Produces(MediaType.APPLICATION_JSON)
@Compensate
public Response compensateWork(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId) {

In order to make the spec more uniform, String should also be allowed as parameter types for Complete and Compensate Methods in the non JAX-RS case.

@Compensate
public void compensateAction(String lraId) {
@mmusgrov
Copy link
Contributor

mmusgrov commented Jun 6, 2019

I am sorry Rudy, on the gitter room when I said I agreed I thought you were talking about the opaque user data on callbacks but when I checked the spec I see that we deferred #15 to milestone 2.

In issue #105 we agreed on URI so I think all we need to do is change all of our examples to use a URI for the header. Note also that JAX-RS header parameters can be of any data type.

Also I don't think the goal should be to exactly mimic what the corresponding JAX-RS methods are doing.

@rdebusscher
Copy link
Member Author

rdebusscher commented Jun 6, 2019

Also I don't think the goal should be to exactly mimic what the corresponding JAX-RS methods are doing.

I know, but it makes the implementation easier in this case. Since Payara will always use the Proxy approach, since there will be no REST communication between Participant and 'coordinator', the allowed parameter types of the method will be different depending on the fact if there is a JAX-RS method (like @put) defined or not.

@rdebusscher
Copy link
Member Author

URI is the only type we support. See also #163.

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 a pull request may close this issue.

2 participants