Package org.eclipse.microprofile.lra.annotation


package org.eclipse.microprofile.lra.annotation
  • Class
    Description
    If a JAX-RS resource method is annotated with LRA and 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 @AfterLRA annotation.
    If a resource method executes in the context of an LRA and if the containing class has a method annotated with @Compensate then 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 its Status) until explicitly told that it can clean up using this @Forget annotation.
    A representation of the status of a Long Running Action according to a LRA state model: The initial state LRAStatus.Active is entered when an LRA is created.
    A representation of the status of a participant according to a participant state model: The initial state ParticipantStatus.Active is 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 invoking Compensate and Complete annotated methods may lose track of the status of a participant.