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
@Participant(name = "TravelAgency") | |
/* @Participant declares the participant’s name to the saga framework */ | |
public class TravelAgencyController extends SagaInitiator { | |
/* TravelAgencyController extends the SagaInitiator class */ | |
@LRA(end = false) | |
/* @LRA annotates the method that begins a saga and invites participants */ | |
@POST("booking") | |
@Consumes(MediaType.TEXT_PLAIN) | |
@Produces(MediaType.APPLICATION_JSON) | |
public jakarta.ws.rs.core.Response booking( |
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
@Participant(name = "Airline") | |
/* @Participant declares the participant’s name to the saga framework */ | |
public class Airline extends SagaParticipant { | |
/* Airline extends the SagaParticipant class */ | |
@Request(sender = "TravelAgency") | |
/* The @Request annotates the method that handles incoming request from a given | |
sender, in this example the TravelAgency */ | |
public String handleTravelAgencyRequest(SagaMessageContext | |
info) { |
OlderNewer