Package org.eclipse.microprofile.lra.annotation
package org.eclipse.microprofile.lra.annotation
-
ClassDescriptionIf a JAX-RS resource method is annotated with
LRAand is invoked in the context of an LRA then the resource can ask to be notified when the LRA finishes by marking one of the other methods in the class with the@AfterLRAannotation.If a resource method executes in the context of an LRA and if the containing class has a method annotated with@Compensatethen this method will be invoked if the LRA is cancelled.If a resource method executes in the context of an LRA and if the containing class has a method annotated with@Complete(as well as method annotated with@Compensate) then this Complete method will be invoked if the LRA is closed.If a participant is unable to complete or compensate immediately (i.e., it has indicated that the request has been accepted and is in progress) or because of a failure (i.e., will never be able to finish) then it must remember the fact (by reporting it when asked for itsStatus) until explicitly told that it can clean up using this@Forgetannotation.A representation of the status of a Long Running Action according to a LRA state model: The initial stateLRAStatus.Activeis entered when an LRA is created.A representation of the status of a participant according to a participant state model: The initial stateParticipantStatus.Activeis entered when a participant is first associated with a Long Running Action.The LRA specification supports distributed communications amongst software components and due to the unreliable nature of networks, messages/requests can be lost, delayed, duplicated, etc., so the implementation component responsible for invokingCompensateandCompleteannotated methods may lose track of the status of a participant.