Last active
September 14, 2019 02:14
-
-
Save paulparkinson/80b77398749c665d54e8f4988080fd28 to your computer and use it in GitHub Desktop.
LRA participant: order service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Path("/placeOrder") | |
@GET | |
@Produces(MediaType.APPLICATION_JSON) | |
@LRA(value = LRA.Type.REQUIRES_NEW) | |
public Response placeOrder(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId) { | |
//... | |
} | |
@Path("/cancelOrder") | |
@PUT | |
@Produces(MediaType.APPLICATION_JSON) | |
@Compensate | |
public Response cancelOrder(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId) throws NotFoundException { | |
//... | |
} | |
@PUT | |
@Path("/completeOrder") | |
@Produces(MediaType.APPLICATION_JSON) | |
@Complete | |
public Response completeOrder(@HeaderParam(LRA_HTTP_CONTEXT_HEADER) String lraId) throws NotFoundException { | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment