Skip to content

Instantly share code, notes, and snippets.

@xstefank
Created November 14, 2019 06:57
Show Gist options
  • Save xstefank/c2c5c6b4f6646ddb7440b3302d0e20f1 to your computer and use it in GitHub Desktop.
Save xstefank/c2c5c6b4f6646ddb7440b3302d0e20f1 to your computer and use it in GitHub Desktop.
@Path("participant")
public class ReusedParticipant {
@GET
@Path("first-flow")
@LRA(LRA.Type.MANDATORY)
public Object firstFlow(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) URI lraId) {
// ...
}
@GET
@Path("second-flow")
@LRA(value = LRA.Type.REQUIRES_NEW, end = false)
public Object secondFlow(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) URI lraId) {
// ...
}
// reuse callbacks
@PUT
@Path("compensate")
@Compensate
public Response compensate() {
// ...
}
@PUT
@Path("complete")
@Complete
public Response complete() {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment