public void configure()

in generic-examples/saga/Saga.java [24:41]


	public void configure() throws Exception {
		// Enable rest binding
        rest();

		LRASagaService service = new LRASagaService();
		service.setCoordinatorUrl("http://lra-coordinator");
		service.setLocalParticipantUrl("http://saga");
		getContext().addService(service);

		from("timer:clock?period=5000&includeMetadata=true")
			.saga()
			.setHeader("id", header(Exchange.TIMER_COUNTER))
			.setHeader(Exchange.HTTP_METHOD, constant("POST"))
			.log("Executing saga #${header.id}")
			.to("http://train/api/train/buy/seat?bridgeEndpoint=true")
			.to("http://flight/api/flight/buy?bridgeEndpoint=true");

	}