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

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


The following commit(s) were added to refs/heads/main by this push:
     new 33a550fa61a CAMEL-20137: camel-joor - Use java as the language name 
(it is java code) as joor is confusing. (#1016)
33a550fa61a is described below

commit 33a550fa61af8d3f09b4ee2503ae33ed0c618696
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Nov 21 13:46:20 2023 +0100

    CAMEL-20137: camel-joor - Use java as the language name (it is java code) 
as joor is confusing. (#1016)
---
 .../springboot/catalog/components/controlbus.json  |  2 +-
 .../camel/springboot/catalog/components/kafka.json |  4 +-
 .../springboot/catalog/components/language.json    |  2 +-
 .../camel/springboot/catalog/languages.properties  |  1 +
 .../catalog/languages/{joor.json => java.json}     | 16 ++---
 .../camel/springboot/catalog/languages/joor.json   |  2 +-
 .../camel-joor-starter/src/main/docs/joor.json     | 43 ++++++++++++
 .../springboot/JavaLanguageAutoConfiguration.java  | 78 ++++++++++++++++++++++
 .../joor/springboot/JavaLanguageConfiguration.java | 77 +++++++++++++++++++++
 ...rk.boot.autoconfigure.AutoConfiguration.imports |  3 +-
 .../camel-kafka-starter/src/main/docs/kafka.json   |  2 +-
 .../springboot/KafkaComponentConfiguration.java    | 14 ++--
 12 files changed, 224 insertions(+), 20 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/controlbus.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/controlbus.json
index efe2f894cc1..804791d4ad6 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/controlbus.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/controlbus.json
@@ -27,7 +27,7 @@
   },
   "properties": {
     "command": { "index": 0, "kind": "path", "displayName": "Command", 
"group": "producer", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "enum": [ "route", "language" ], "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "Command can be either route or language" },
-    "language": { "index": 1, "kind": "path", "displayName": "Language", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.spi.Language", "enum": [ "bean", "constant", 
"csimple", "datasonnet", "exchangeProperty", "file", "groovy", "header", 
"hl7terser", "joor", "jq", "jsonpath", "mvel", "ognl", "python", "ref", 
"simple", "spel", "tokenize", "xpath", "xquery", "xtokenize" ], "deprecated": 
false, "autowired": false, "secret": false, "descr [...]
+    "language": { "index": 1, "kind": "path", "displayName": "Language", 
"group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.spi.Language", "enum": [ "bean", "constant", 
"csimple", "datasonnet", "exchangeProperty", "file", "groovy", "header", 
"hl7terser", "java", "joor", "jq", "jsonpath", "mvel", "ognl", "python", "ref", 
"simple", "spel", "tokenize", "xpath", "xquery", "xtokenize" ], "deprecated": 
false, "autowired": false, "secret": false [...]
     "action": { "index": 2, "kind": "parameter", "displayName": "Action", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "enum": [ "start", "stop", "fail", "suspend", 
"resume", "restart", "status", "stats" ], "deprecated": false, "autowired": 
false, "secret": false, "description": "To denote an action that can be either: 
start, stop, or status. To either start or stop a route, or to get the status 
of the route as output in the messa [...]
     "async": { "index": 3, "kind": "parameter", "displayName": "Async", 
"group": "producer", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "description": "Whether to execute the control 
bus task asynchronously. Important: If this option is enabled, then any result 
from the task is not set on the Exchange. This is only possible if executing 
tasks synchronously." },
     "loggingLevel": { "index": 4, "kind": "parameter", "displayName": "Logging 
Level", "group": "producer", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.LoggingLevel", "enum": [ "TRACE", "DEBUG", 
"INFO", "WARN", "ERROR", "OFF" ], "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "INFO", "description": "Logging level used for 
logging when task is done, or if any exceptions occurred during processing the 
task." },
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
index e5780543b3e..22b7a338f07 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/kafka.json
@@ -33,7 +33,7 @@
     "autoCommitEnable": { "index": 8, "kind": "property", "displayName": "Auto 
Commit Enable", "group": "consumer", "label": "consumer", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "If true, periodically commit to ZooKeeper the 
offset of messages already fetched b [...]
     "autoCommitIntervalMs": { "index": 9, "kind": "property", "displayName": 
"Auto Commit Interval Ms", "group": "consumer", "label": "consumer", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"5000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The frequency in ms that the consumer offsets 
are committed t [...]
     "autoOffsetReset": { "index": 10, "kind": "property", "displayName": "Auto 
Offset Reset", "group": "consumer", "label": "consumer", "required": false, 
"type": "string", "javaType": "java.lang.String", "enum": [ "latest", 
"earliest", "none" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "latest", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "What to do when there is no i [...]
-    "breakOnFirstError": { "index": 11, "kind": "property", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange  [...]
+    "breakOnFirstError": { "index": 11, "kind": "property", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange  [...]
     "bridgeErrorHandler": { "index": 12, "kind": "property", "displayName": 
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": 
"Allows for bridging the consumer to the Camel routing Error Handler, which 
mean any exceptions (if possible) occurred while the Camel consumer is trying 
to pickup incoming messages, or the lik [...]
     "checkCrcs": { "index": 13, "kind": "property", "displayName": "Check 
Crcs", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "true", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "Automatically check the CRC32 of the records 
consumed. This ensures no on-the-wire o [...]
     "commitTimeoutMs": { "index": 14, "kind": "property", "displayName": 
"Commit Timeout Ms", "group": "consumer", "label": "consumer", "required": 
false, "type": "duration", "javaType": "java.lang.Long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "5000", 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "The maximum time, in 
milliseconds, that the code will wait for a synchron [...]
@@ -163,7 +163,7 @@
     "autoCommitEnable": { "index": 8, "kind": "parameter", "displayName": 
"Auto Commit Enable", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "If true, periodically 
commit to ZooKeeper the offset of messages already fetched  [...]
     "autoCommitIntervalMs": { "index": 9, "kind": "parameter", "displayName": 
"Auto Commit Interval Ms", "group": "consumer", "label": "consumer", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"5000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The frequency in ms that the consumer offsets 
are committed  [...]
     "autoOffsetReset": { "index": 10, "kind": "parameter", "displayName": 
"Auto Offset Reset", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "latest", 
"earliest", "none" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "latest", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "What to do when there is no  [...]
-    "breakOnFirstError": { "index": 11, "kind": "parameter", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange [...]
+    "breakOnFirstError": { "index": 11, "kind": "parameter", "displayName": 
"Break On First Error", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "This options controls 
what happens when a consumer is processing an exchange [...]
     "checkCrcs": { "index": 12, "kind": "parameter", "displayName": "Check 
Crcs", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "true", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "Automatically check the CRC32 of the records 
consumed. This ensures no on-the-wire  [...]
     "commitTimeoutMs": { "index": 13, "kind": "parameter", "displayName": 
"Commit Timeout Ms", "group": "consumer", "label": "consumer", "required": 
false, "type": "duration", "javaType": "java.lang.Long", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "5000", 
"configurationClass": "org.apache.camel.component.kafka.KafkaConfiguration", 
"configurationField": "configuration", "description": "The maximum time, in 
milliseconds, that the code will wait for a synchro [...]
     "consumerRequestTimeoutMs": { "index": 14, "kind": "parameter", 
"displayName": "Consumer Request Timeout Ms", "group": "consumer", "label": 
"consumer", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "30000", "configurationClass": 
"org.apache.camel.component.kafka.KafkaConfiguration", "configurationField": 
"configuration", "description": "The configuration controls the maximum amount 
of t [...]
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/language.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/language.json
index f4f81564a10..902befa5c1a 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/language.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/language.json
@@ -29,7 +29,7 @@
     "CamelLanguageScript": { "index": 0, "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String or 
Expression", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The script to execute provided in the header. 
Takes precedence over script configured on the endpoint.", "constantName": 
"org.apache.camel.component.language.LanguageConstants#LANGUAGE_SCRIPT" }
   },
   "properties": {
-    "languageName": { "index": 0, "kind": "path", "displayName": "Language 
Name", "group": "producer", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "enum": [ "bean", "constant", "csimple", 
"datasonnet", "exchangeProperty", "file", "groovy", "header", "hl7terser", 
"joor", "jq", "jsonpath", "mvel", "ognl", "ref", "simple", "spel", "sql", 
"tokenize", "xpath", "xquery", "xtokenize" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret" [...]
+    "languageName": { "index": 0, "kind": "path", "displayName": "Language 
Name", "group": "producer", "label": "", "required": true, "type": "string", 
"javaType": "java.lang.String", "enum": [ "bean", "constant", "csimple", 
"datasonnet", "exchangeProperty", "file", "groovy", "header", "hl7terser", 
"java", "joor", "jq", "jsonpath", "mvel", "ognl", "ref", "simple", "spel", 
"sql", "tokenize", "xpath", "xquery", "xtokenize" ], "deprecated": false, 
"deprecationNote": "", "autowired": false,  [...]
     "resourceUri": { "index": 1, "kind": "path", "displayName": "Resource 
Uri", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "supportFileReference": true, 
"description": "Path to the resource, or a reference to lookup a bean in the 
Registry to use as the resource" },
     "allowContextMapAll": { "index": 2, "kind": "parameter", "displayName": 
"Allow Context Map All", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Sets whether the 
context map should allow access to all details. By default only the message 
body and headers can be accessed. This option can be enabled for full access to 
the current Exchange and C [...]
     "binary": { "index": 3, "kind": "parameter", "displayName": "Binary", 
"group": "producer", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "description": "Whether the script is binary 
content or text content. By default the script is read as text content (eg 
java.lang.String)" },
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages.properties
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages.properties
index cb390b03f92..679c08369d7 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages.properties
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages.properties
@@ -2,6 +2,7 @@ bean
 datasonnet
 groovy
 hl7terser
+java
 joor
 jq
 js
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/java.json
similarity index 87%
copy from 
catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
copy to 
catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/java.json
index 16d53c5d896..10e430904c0 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/java.json
@@ -1,19 +1,19 @@
 {
   "language": {
     "kind": "language",
-    "name": "joor",
-    "title": "jOOR",
-    "description": "Evaluates a jOOR (Java compiled once at runtime) 
expression.",
+    "name": "java",
+    "title": "Java",
+    "description": "Evaluates a Java (Java compiled once at runtime) 
expression.",
     "deprecated": false,
-    "firstVersion": "3.7.0",
+    "firstVersion": "4.3.0",
     "label": "language",
-    "javaType": "org.apache.camel.language.joor.JoorLanguage",
-    "supportLevel": "Stable",
+    "javaType": "org.apache.camel.language.joor.JavaLanguage",
+    "supportLevel": "Preview",
     "groupId": "org.apache.camel.springboot",
     "artifactId": "camel-joor-starter",
     "version": "4.3.0-SNAPSHOT",
-    "modelName": "joor",
-    "modelJavaType": "org.apache.camel.model.language.JoorExpression"
+    "modelName": "java",
+    "modelJavaType": "org.apache.camel.model.language.JavaExpression"
   },
   "properties": {
     "expression": { "index": 0, "kind": "value", "displayName": "Expression", 
"required": true, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
expression value in your chosen language syntax" },
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
index 16d53c5d896..adcc595709e 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/languages/joor.json
@@ -4,7 +4,7 @@
     "name": "joor",
     "title": "jOOR",
     "description": "Evaluates a jOOR (Java compiled once at runtime) 
expression.",
-    "deprecated": false,
+    "deprecated": true,
     "firstVersion": "3.7.0",
     "label": "language",
     "javaType": "org.apache.camel.language.joor.JoorLanguage",
diff --git a/components-starter/camel-joor-starter/src/main/docs/joor.json 
b/components-starter/camel-joor-starter/src/main/docs/joor.json
index 3b7e884169f..0f55d581682 100644
--- a/components-starter/camel-joor-starter/src/main/docs/joor.json
+++ b/components-starter/camel-joor-starter/src/main/docs/joor.json
@@ -1,5 +1,16 @@
 {
   "groups": [
+    {
+      "name": "camel.language.java",
+      "type": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration",
+      "sourceType": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration"
+    },
+    {
+      "name": "camel.language.java.customizer",
+      "type": 
"org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon$CustomizerProperties",
+      "sourceType": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration",
+      "sourceMethod": "getCustomizer()"
+    },
     {
       "name": "camel.language.joor",
       "type": 
"org.apache.camel.language.joor.springboot.JoorLanguageConfiguration",
@@ -13,6 +24,38 @@
     }
   ],
   "properties": [
+    {
+      "name": "camel.language.java.customizer.enabled",
+      "type": "java.lang.Boolean",
+      "sourceType": 
"org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon$CustomizerProperties"
+    },
+    {
+      "name": "camel.language.java.enabled",
+      "type": "java.lang.Boolean",
+      "description": "Whether to enable auto configuration of the java 
language. This is enabled by default.",
+      "sourceType": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration"
+    },
+    {
+      "name": "camel.language.java.pre-compile",
+      "type": "java.lang.Boolean",
+      "description": "Whether the expression should be pre compiled once 
during initialization phase. If this is turned off, then the expression is 
reloaded and compiled on each evaluation.",
+      "sourceType": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration",
+      "defaultValue": true
+    },
+    {
+      "name": "camel.language.java.single-quotes",
+      "type": "java.lang.Boolean",
+      "description": "Whether single quotes can be used as replacement for 
double quotes. This is convenient when you need to work with strings inside 
strings.",
+      "sourceType": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration",
+      "defaultValue": true
+    },
+    {
+      "name": "camel.language.java.trim",
+      "type": "java.lang.Boolean",
+      "description": "Whether to trim the value to remove leading and trailing 
whitespaces and line breaks",
+      "sourceType": 
"org.apache.camel.language.joor.springboot.JavaLanguageConfiguration",
+      "defaultValue": true
+    },
     {
       "name": "camel.language.joor.customizer.enabled",
       "type": "java.lang.Boolean",
diff --git 
a/components-starter/camel-joor-starter/src/main/java/org/apache/camel/language/joor/springboot/JavaLanguageAutoConfiguration.java
 
b/components-starter/camel-joor-starter/src/main/java/org/apache/camel/language/joor/springboot/JavaLanguageAutoConfiguration.java
new file mode 100644
index 00000000000..7b09425643c
--- /dev/null
+++ 
b/components-starter/camel-joor-starter/src/main/java/org/apache/camel/language/joor/springboot/JavaLanguageAutoConfiguration.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.language.joor.springboot;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.language.joor.JavaLanguage;
+import org.apache.camel.spi.Language;
+import org.apache.camel.spi.LanguageCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.LanguageConfigurationProperties;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import 
org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
+import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.boot.convert.ApplicationConversionService;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@AutoConfigureAfter(CamelAutoConfiguration.class)
+@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
+@EnableConfigurationProperties({LanguageConfigurationProperties.class,JavaLanguageConfiguration.class})
+@ConditionalOnHierarchicalProperties({"camel.language", "camel.language.java"})
+public class JavaLanguageAutoConfiguration {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+    private final CamelContext camelContext;
+    @Autowired
+    private JavaLanguageConfiguration configuration;
+
+    public JavaLanguageAutoConfiguration(
+            org.apache.camel.CamelContext camelContext) {
+        this.camelContext = camelContext;
+    }
+
+    @Lazy
+    @Bean
+    public org.apache.camel.spi.LanguageCustomizer configureJavaLanguage() {
+        return new LanguageCustomizer() {
+            @Override
+            public void configure(String name, Language target) {
+                CamelPropertiesHelper.copyProperties(camelContext, 
configuration, target);
+            }
+            @Override
+            public boolean isEnabled(String name, Language target) {
+                return HierarchicalPropertiesEvaluator.evaluate(
+                        applicationContext,
+                        "camel.language.customizer",
+                        "camel.language.java.customizer")
+                    && target instanceof JavaLanguage;
+            }
+        };
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-joor-starter/src/main/java/org/apache/camel/language/joor/springboot/JavaLanguageConfiguration.java
 
b/components-starter/camel-joor-starter/src/main/java/org/apache/camel/language/joor/springboot/JavaLanguageConfiguration.java
new file mode 100644
index 00000000000..64ca2d38fff
--- /dev/null
+++ 
b/components-starter/camel-joor-starter/src/main/java/org/apache/camel/language/joor/springboot/JavaLanguageConfiguration.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.language.joor.springboot;
+
+import org.apache.camel.spring.boot.LanguageConfigurationPropertiesCommon;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * Evaluates a Java (Java compiled once at runtime) expression.
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.java")
+public class JavaLanguageConfiguration
+        extends
+            LanguageConfigurationPropertiesCommon {
+
+    /**
+     * Whether to enable auto configuration of the java language. This is
+     * enabled by default.
+     */
+    private Boolean enabled;
+    /**
+     * Whether the expression should be pre compiled once during initialization
+     * phase. If this is turned off, then the expression is reloaded and
+     * compiled on each evaluation.
+     */
+    private Boolean preCompile = true;
+    /**
+     * Whether single quotes can be used as replacement for double quotes. This
+     * is convenient when you need to work with strings inside strings.
+     */
+    private Boolean singleQuotes = true;
+    /**
+     * Whether to trim the value to remove leading and trailing whitespaces and
+     * line breaks
+     */
+    private Boolean trim = true;
+
+    public Boolean getPreCompile() {
+        return preCompile;
+    }
+
+    public void setPreCompile(Boolean preCompile) {
+        this.preCompile = preCompile;
+    }
+
+    public Boolean getSingleQuotes() {
+        return singleQuotes;
+    }
+
+    public void setSingleQuotes(Boolean singleQuotes) {
+        this.singleQuotes = singleQuotes;
+    }
+
+    public Boolean getTrim() {
+        return trim;
+    }
+
+    public void setTrim(Boolean trim) {
+        this.trim = trim;
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-joor-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
 
b/components-starter/camel-joor-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index c392d1f6f52..47d41fcf2e4 100644
--- 
a/components-starter/camel-joor-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ 
b/components-starter/camel-joor-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -15,4 +15,5 @@
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
 
-org.apache.camel.language.joor.springboot.JoorLanguageAutoConfiguration
\ No newline at end of file
+org.apache.camel.language.joor.springboot.JoorLanguageAutoConfiguration
+org.apache.camel.language.joor.springboot.JavaLanguageAutoConfiguration
diff --git a/components-starter/camel-kafka-starter/src/main/docs/kafka.json 
b/components-starter/camel-kafka-starter/src/main/docs/kafka.json
index 013f190745e..03ef3739b5a 100644
--- a/components-starter/camel-kafka-starter/src/main/docs/kafka.json
+++ b/components-starter/camel-kafka-starter/src/main/docs/kafka.json
@@ -64,7 +64,7 @@
     {
       "name": "camel.component.kafka.break-on-first-error",
       "type": "java.lang.Boolean",
-      "description": "This options controls what happens when a consumer is 
processing an exchange and it fails. If the option is false then the consumer 
continues to the next message and processes it. If the option is true then the 
consumer breaks out, and will seek back to offset of the message that caused a 
failure, and then re-attempt to process this message. However this can lead to 
endless processing of the same message if its bound to fail every time, eg a 
poison message. Therefor [...]
+      "description": "This options controls what happens when a consumer is 
processing an exchange and it fails. If the option is false then the consumer 
continues to the next message and processes it. If the option is true then the 
consumer breaks out. Using the default NoopCommitManager will cause the 
consumer to not commit the offset so that the message is re-attempted. The 
consumer should use the KafkaManualCommit to determine the best way to handle 
the message. Using either the Sync [...]
       "sourceType": 
"org.apache.camel.component.kafka.springboot.KafkaComponentConfiguration",
       "defaultValue": false
     },
diff --git 
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
 
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
index 778834201be..2847e3907de 100644
--- 
a/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
+++ 
b/components-starter/camel-kafka-starter/src/main/java/org/apache/camel/component/kafka/springboot/KafkaComponentConfiguration.java
@@ -121,11 +121,15 @@ public class KafkaComponentConfiguration
      * This options controls what happens when a consumer is processing an
      * exchange and it fails. If the option is false then the consumer 
continues
      * to the next message and processes it. If the option is true then the
-     * consumer breaks out, and will seek back to offset of the message that
-     * caused a failure, and then re-attempt to process this message. However
-     * this can lead to endless processing of the same message if its bound to
-     * fail every time, eg a poison message. Therefore it is recommended to 
deal
-     * with that for example by using Camel's error handler.
+     * consumer breaks out. Using the default NoopCommitManager will cause the
+     * consumer to not commit the offset so that the message is re-attempted.
+     * The consumer should use the KafkaManualCommit to determine the best way
+     * to handle the message. Using either the SynchCommitManager or the
+     * AsynchCommitManager the consumer will seek back to the offset of the
+     * message that caused a failure, and then re-attempt to process this
+     * message. However this can lead to endless processing of the same message
+     * if its bound to fail every time, eg a poison message. Therefore its
+     * recommended to deal with that for example by using Camel's error 
handler.
      */
     private Boolean breakOnFirstError = false;
     /**

Reply via email to