This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 268fb15e ci: fix main-joor example to use the java language (#270)
268fb15e is described below

commit 268fb15e40286b728b804bdacb7f33bf177d0b9b
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Sep 21 10:16:13 2026 +0200

    ci: fix main-joor example to use the java language (#270)
    
    The joor() DSL method was removed in Camel 4.23; the jOOR-backed language 
is now named java and called with java(). Switch MyRouteBuilder to java(), keep 
the camel-joor dependency and camel-joor.properties (still read by the java 
language), and update the README and test wording.
---
 main-joor/README.adoc                                                | 5 +++--
 main-joor/src/main/java/org/apache/camel/example/MyRouteBuilder.java | 2 +-
 main-joor/src/test/java/org/apache/camel/example/MainJOORTest.java   | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/main-joor/README.adoc b/main-joor/README.adoc
index 6bfb2aa0..4c31fec0 100644
--- a/main-joor/README.adoc
+++ b/main-joor/README.adoc
@@ -1,7 +1,8 @@
 == Camel Example Main jOOR
 
-This example shows using the new jOOR language in the Camel DSL.
-The jOOR language is very performant, as it is compiled once to Java code 
during startup (runtime).
+This example shows using the `java` language in the Camel DSL, provided by the 
`camel-joor` component.
+The language compiles the expression to Java once during startup (runtime), so 
it is very performant. It was
+called the `joor` language until Camel renamed it to `java`; the DSL method is 
`java()`.
 
 === Build
 
diff --git 
a/main-joor/src/main/java/org/apache/camel/example/MyRouteBuilder.java 
b/main-joor/src/main/java/org/apache/camel/example/MyRouteBuilder.java
index 941f88ce..813ddbaa 100644
--- a/main-joor/src/main/java/org/apache/camel/example/MyRouteBuilder.java
+++ b/main-joor/src/main/java/org/apache/camel/example/MyRouteBuilder.java
@@ -25,7 +25,7 @@ public class MyRouteBuilder extends RouteBuilder {
         from("timer:foo?period={{myPeriod}}")
             .bean(UserFactoryBean.class, "createUser")
             .choice()
-                .when(joor("var user = bodyAs(MyUser); return user.getName() 
!= null && user.getAge() > 21"))
+                .when(java("var user = bodyAs(MyUser); return user.getName() 
!= null && user.getAge() > 21"))
                     .log("User ${body} can enter bar")
                 .otherwise()
                     .log("User ${body} cannot enter bar");
diff --git a/main-joor/src/test/java/org/apache/camel/example/MainJOORTest.java 
b/main-joor/src/test/java/org/apache/camel/example/MainJOORTest.java
index 895f3115..3d2f2b98 100644
--- a/main-joor/src/test/java/org/apache/camel/example/MainJOORTest.java
+++ b/main-joor/src/test/java/org/apache/camel/example/MainJOORTest.java
@@ -29,7 +29,7 @@ import static 
org.apache.camel.util.PropertiesHelper.asProperties;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
- * A unit test checking that Camel supports jOOR language in the Camel DSL.
+ * A unit test checking that Camel supports the java language (backed by jOOR) 
in the Camel DSL.
  */
 class MainJOORTest extends CamelMainTestSupport {
 
@@ -41,7 +41,7 @@ class MainJOORTest extends CamelMainTestSupport {
     }
 
     @Test
-    void should_support_joor_in_dsl() {
+    void should_support_java_in_dsl() {
         NotifyBuilder notify = new 
NotifyBuilder(context).whenCompleted(10).create();
         assertTrue(
             notify.matches(20, TimeUnit.SECONDS), "10 messages should be 
completed"

Reply via email to