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

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a1dd2bd2c46105a2810a345c13a3bfdc98c88c66
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Mar 10 08:42:43 2020 +0100

    Add the clearModelReferences flag to camel-main
---
 .../resources/META-INF/camel-main-configuration-metadata.json    | 1 +
 .../org/apache/camel/main/DefaultConfigurationConfigurer.java    | 1 +
 .../org/apache/camel/main/DefaultConfigurationProperties.java    | 9 +++++++++
 3 files changed, 11 insertions(+)

diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 0aa9ff4..7d8987f 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -21,6 +21,7 @@
     { "name": "camel.main.beanIntrospectionExtendedStatistics", "description": 
"Sets whether bean introspection uses extended statistics. The default is 
false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", 
"type": "boolean", "javaType": "boolean" },
     { "name": "camel.main.beanIntrospectionLoggingLevel", "description": "Sets 
the logging level used by bean introspection, logging activity of its usage. 
The default is TRACE.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object", 
"javaType": "org.apache.camel.LoggingLevel", "enum": [ "ERROR", "WARN", "INFO", 
"DEBUG", "TRACE", "OFF" ] },
     { "name": "camel.main.caseInsensitiveHeaders", "description": "Whether to 
use case sensitive or insensitive headers. Important: When using case sensitive 
(this is set to false). Then the map is case sensitive which means headers such 
as content-type and Content-Type are two different keys which can be a problem 
for some protocols such as HTTP based, which rely on case insensitive headers. 
However case sensitive implementations can yield faster performance. Therefore 
use case sensitiv [...]
+    { "name": "camel.main.clearModelReferences", "description": null, 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean" },
     { "name": "camel.main.consumerTemplateCacheSize", "description": "Consumer 
template endpoints cache size.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", 
"javaType": "int", "defaultValue": 1000 },
     { "name": "camel.main.durationHitExitCode", "description": "Sets the exit 
code for the application if duration was hit", "sourceType": 
"org.apache.camel.main.MainConfigurationProperties", "type": "integer", 
"javaType": "int" },
     { "name": "camel.main.durationMaxIdleSeconds", "description": "To specify 
for how long time in seconds Camel can be idle before automatic terminating the 
JVM. You can use this to run Camel for a short while.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", 
"javaType": "int" },
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
index 8d83156..a576f72 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
@@ -154,6 +154,7 @@ public final class DefaultConfigurationConfigurer {
         
camelContext.setMDCLoggingKeysPattern(config.getMdcLoggingKeysPattern());
         camelContext.setLoadTypeConverters(config.isLoadTypeConverters());
         ecc.setAllowAddingNewRoutes(config.isAllowAddingNewRoutes());
+        ecc.setClearModelReferences(config.isClearModelReferences());
 
         if (camelContext.getManagementStrategy().getManagementAgent() != null) 
{
             
camelContext.getManagementStrategy().getManagementAgent().setEndpointRuntimeStatisticsEnabled(config.isEndpointRuntimeStatisticsEnabled());
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index 2d5f19d..cc2b2d5 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -67,6 +67,7 @@ public abstract class DefaultConfigurationProperties<T> {
     private boolean useDataType;
     private boolean useBreadcrumb;
     private boolean allowAddingNewRoutes = true;
+    private boolean clearModelReferences;
     private ManagementStatisticsLevel jmxManagementStatisticsLevel = 
ManagementStatisticsLevel.Default;
     private String jmxManagementNamePattern = "#name#";
     private boolean jmxCreateConnector;
@@ -657,6 +658,14 @@ public abstract class DefaultConfigurationProperties<T> {
         this.allowAddingNewRoutes = allowAddingNewRoutes;
     }
 
+    public boolean isClearModelReferences() {
+        return clearModelReferences;
+    }
+
+    public void setClearModelReferences(boolean clearModelReferences) {
+        this.clearModelReferences = clearModelReferences;
+    }
+
     public ManagementStatisticsLevel getJmxManagementStatisticsLevel() {
         return jmxManagementStatisticsLevel;
     }

Reply via email to