Skip to content

Commit

Permalink
Remove route() from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lfabriko committed Oct 24, 2023
1 parent d3f5adc commit b8680e7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions examples/rest/routes-rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@
rest('/say/hello')
.produces("text/plain")
.get()
.route()
.transform().constant("Hello World");
.to('direct:sayHello')

from('direct:sayHello')
.transform().constant("Hello World");
4 changes: 3 additions & 1 deletion examples/saga/Flight.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public void configure() throws Exception {

rest("/api").post("/flight/buy")
.param().type(RestParamType.header).name("id").required(true).endParam()
.route()
.to("direct:buy");

from("direct:buy")
.saga()
.propagation(SagaPropagation.MANDATORY)
.option("id", header("id"))
Expand Down
4 changes: 3 additions & 1 deletion examples/saga/Payment.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public void configure() throws Exception {
rest("/api/").post("/pay")
.param().type(RestParamType.query).name("type").required(true).endParam()
.param().type(RestParamType.header).name("id").required(true).endParam()
.route()
.to("direct:pay");

from("direct:pay")
.saga()
.propagation(SagaPropagation.MANDATORY)
.option("id", header("id"))
Expand Down
4 changes: 3 additions & 1 deletion examples/saga/Train.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public void configure() throws Exception {

rest("/api/").post("/train/buy/seat")
.param().type(RestParamType.header).name("id").required(true).endParam()
.route()
.to("direct:buySeat");

from("direct:buySeat")
.saga()
.propagation(SagaPropagation.SUPPORTS)
.option("id", header("id"))
Expand Down
2 changes: 1 addition & 1 deletion examples/saga/lra-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
scheme: HTTP
initialDelaySeconds: 180
name: lra-coordinator
image: docker.io/jbosstm/lra-coordinator:5.9.8.Final
image: quay.io/jbosstm/lra-coordinator:latest
ports:
- containerPort: 8080
protocol: TCP
Expand Down

0 comments on commit b8680e7

Please sign in to comment.