[jbossts-issues] [JBoss JIRA] (JBTM-3156) LRA does not respect all participant immediate state indications

Michael Musgrove (Jira) issues at jboss.org
Wed Jun 19 04:48:00 EDT 2019

    [ https://issues.jboss.org/browse/JBTM-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13748691#comment-13748691 ] 

Michael Musgrove commented on JBTM-3156:

The coordinator is a REST resource and it expects a compensator to return 202 Accepted if the resource update is still in progress.

I would clarify the spec to state that JAX-RS based compensators MUST return 202 if they cannot perform compensation actions immediately. I will raise a PR on MP-LRA to provide the clarification.

> LRA does not respect all participant immediate state indications
> ----------------------------------------------------------------
>                 Key: JBTM-3156
>                 URL: https://issues.jboss.org/browse/JBTM-3156
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>          Components: LRA
>    Affects Versions: 5.9.5.Final
>            Reporter: Martin Stefanko
>            Assignee: Martin Stefanko
>            Priority: Major
> The specification states at https://github.com/eclipse/microprofile-lra/blob/master/spec/src/main/asciidoc/microprofile-lra-spec.adoc#326-eventual-compensations:
> {noformat}
> If the resource cannot perform a compensation activity immediately the @Compensate method SHOULD do one or more of the following:
> return ParticipantStatus.Compensating
> return a 202 Accepted HTTP status code
> mark the method as a JAX-RS asynchronous method (using the javax.ws.rs.container.Suspended annotation).
> {noformat}
> However, Narayana respects only the ACCEPTED status code: https://github.com/jbosstm/narayana/blob/master/rts/lra/lra-coordinator/src/main/java/io/narayana/lra/coordinator/domain/model/LRARecord.java#L323
> The implementation should also cover two other variants.

This message was sent by Atlassian Jira

More information about the jbossts-issues mailing list