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.git
The following commit(s) were added to refs/heads/main by this push:
new 60f10b3fb2b Remove lightweight option that are not in use
60f10b3fb2b is described below
commit 60f10b3fb2b113f111a6e41a0a61afd43c643af2
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Feb 22 09:40:20 2025 +0100
Remove lightweight option that are not in use
---
.../main/camel-main-configuration-metadata.json | 1 -
.../org/apache/camel/ExtendedCamelContext.java | 10 ---
.../impl/engine/DefaultCamelContextExtension.java | 4 --
.../MainConfigurationPropertiesConfigurer.java | 4 --
...trySimpleConfigurationPropertiesConfigurer.java | 81 ----------------------
.../camel-main-configuration-metadata.json | 1 -
core/camel-main/src/main/docs/main.adoc | 3 +-
.../camel/main/DefaultConfigurationProperties.java | 25 -------
.../ROOT/pages/camel-4x-upgrade-guide-4_11.adoc | 4 ++
9 files changed, 5 insertions(+), 128 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 5c7e763fe91..0c820eb09e6 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -79,7 +79,6 @@
{ "name": "camel.main.jmxManagementRegisterRoutesCreateByTemplate",
"description": "Whether routes created by route templates (not Kamelets) should
be registered for JMX management. Enabling this allows to have fine-grained
monitoring and management of every route created via route templates. This is
default enabled (unlike Kamelets) as routes created via templates is regarded
as standard routes, and should be available for management and monitoring.",
"sourceType": "org.apache.camel [...]
{ "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets
the JMX statistics level, the level can be set to Extended to gather additional
information The default value is Default.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object",
"javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue":
"Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
{ "name": "camel.main.jmxUpdateRouteEnabled", "description": "Whether to
allow updating routes at runtime via JMX using the ManagedRouteMBean. This is
disabled by default, but can be enabled for development and troubleshooting
purposes, such as updating routes in an existing running Camel via JMX and
other tools.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
- { "name": "camel.main.lightweight", "description": "Configure the context
to be lightweight. This will trigger some optimizations and memory reduction
options. Lightweight context have some limitations. At this moment, dynamic
endpoint destinations are not supported.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
{ "name": "camel.main.loadHealthChecks", "description": "Whether to load
custom health checks by scanning classpath.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
{ "name": "camel.main.loadStatisticsEnabled", "description": "Sets whether
Camel load (inflight messages, not cpu) statistics is enabled (something like
the unix load average). The statistics requires to have camel-management on the
classpath as JMX is required. The default value is false.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
{ "name": "camel.main.loadTypeConverters", "description": "Whether to load
custom type converters by scanning classpath. This is used for backwards
compatibility with Camel 2.x. Its recommended to migrate to use fast type
converter loading by setting Converter(loader = true) on your custom type
converter classes.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
diff --git
a/core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java
b/core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java
index c673400b442..4a458c5b44c 100644
--- a/core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java
+++ b/core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java
@@ -484,16 +484,6 @@ public interface ExtendedCamelContext {
*/
Processor createErrorHandler(Route route, Processor processor) throws
Exception;
- /**
- * Danger!!! This will dispose the route model from the {@link
CamelContext} which is used for lightweight mode.
- * This means afterwards no new routes can be dynamically added. Any
operations on the
- * org.apache.camel.model.ModelCamelContext will return null or be a noop
operation.
- *
- * @deprecated noop, do not use
- */
- @Deprecated
- void disposeModel();
-
/**
* Used during unit-testing where it is possible to specify a set of
routes to exclude from discovery
*/
diff --git
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
index b4752104bce..631bfbd2d03 100644
---
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
+++
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultCamelContextExtension.java
@@ -1086,10 +1086,6 @@ class DefaultCamelContextExtension implements
ExtendedCamelContext {
return camelContext.createErrorHandler(route, processor);
}
- @Override
- public void disposeModel() {
- }
-
@Override
public String getTestExcludeRoutes() {
return camelContext.getTestExcludeRoutes();
diff --git
a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
index aa28cdb35b3..1a7ccf5dbe0 100644
---
a/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
+++
b/core/camel-main/src/generated/java/org/apache/camel/main/MainConfigurationPropertiesConfigurer.java
@@ -77,7 +77,6 @@ public class MainConfigurationPropertiesConfigurer extends
org.apache.camel.supp
map.put("JmxManagementRegisterRoutesCreateByTemplate", boolean.class);
map.put("JmxManagementStatisticsLevel",
org.apache.camel.ManagementStatisticsLevel.class);
map.put("JmxUpdateRouteEnabled", boolean.class);
- map.put("Lightweight", boolean.class);
map.put("LoadHealthChecks", boolean.class);
map.put("LoadStatisticsEnabled", boolean.class);
map.put("LoadTypeConverters", boolean.class);
@@ -260,7 +259,6 @@ public class MainConfigurationPropertiesConfigurer extends
org.apache.camel.supp
case "jmxManagementStatisticsLevel":
target.setJmxManagementStatisticsLevel(property(camelContext,
org.apache.camel.ManagementStatisticsLevel.class, value)); return true;
case "jmxupdaterouteenabled":
case "jmxUpdateRouteEnabled":
target.setJmxUpdateRouteEnabled(property(camelContext, boolean.class, value));
return true;
- case "lightweight": target.setLightweight(property(camelContext,
boolean.class, value)); return true;
case "loadhealthchecks":
case "loadHealthChecks":
target.setLoadHealthChecks(property(camelContext, boolean.class, value));
return true;
case "loadstatisticsenabled":
@@ -511,7 +509,6 @@ public class MainConfigurationPropertiesConfigurer extends
org.apache.camel.supp
case "jmxManagementStatisticsLevel": return
org.apache.camel.ManagementStatisticsLevel.class;
case "jmxupdaterouteenabled":
case "jmxUpdateRouteEnabled": return boolean.class;
- case "lightweight": return boolean.class;
case "loadhealthchecks":
case "loadHealthChecks": return boolean.class;
case "loadstatisticsenabled":
@@ -758,7 +755,6 @@ public class MainConfigurationPropertiesConfigurer extends
org.apache.camel.supp
case "jmxManagementStatisticsLevel": return
target.getJmxManagementStatisticsLevel();
case "jmxupdaterouteenabled":
case "jmxUpdateRouteEnabled": return target.isJmxUpdateRouteEnabled();
- case "lightweight": return target.isLightweight();
case "loadhealthchecks":
case "loadHealthChecks": return target.isLoadHealthChecks();
case "loadstatisticsenabled":
diff --git
a/core/camel-main/src/generated/java/org/apache/camel/main/TelemetrySimpleConfigurationPropertiesConfigurer.java
b/core/camel-main/src/generated/java/org/apache/camel/main/TelemetrySimpleConfigurationPropertiesConfigurer.java
deleted file mode 100644
index 57292947930..00000000000
---
a/core/camel-main/src/generated/java/org/apache/camel/main/TelemetrySimpleConfigurationPropertiesConfigurer.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.main;
-
-import javax.annotation.processing.Generated;
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurerGetter;
-import org.apache.camel.spi.ConfigurerStrategy;
-import org.apache.camel.spi.GeneratedPropertyConfigurer;
-import org.apache.camel.util.CaseInsensitiveMap;
-import org.apache.camel.main.TelemetryDevConfigurationProperties;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
-@SuppressWarnings("unchecked")
-public class TelemetrySimpleConfigurationPropertiesConfigurer extends
org.apache.camel.support.component.PropertyConfigurerSupport implements
GeneratedPropertyConfigurer, ExtendedPropertyConfigurerGetter {
-
- private static final Map<String, Object> ALL_OPTIONS;
- static {
- Map<String, Object> map = new CaseInsensitiveMap();
- map.put("Enabled", boolean.class);
- map.put("ExcludePatterns", java.lang.String.class);
- map.put("TraceFormat", java.lang.String.class);
- map.put("TraceProcessors", boolean.class);
- ALL_OPTIONS = map;
- }
-
- @Override
- public boolean configure(CamelContext camelContext, Object obj, String
name, Object value, boolean ignoreCase) {
- org.apache.camel.main.TelemetryDevConfigurationProperties target =
(org.apache.camel.main.TelemetryDevConfigurationProperties) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "enabled": target.setEnabled(property(camelContext,
boolean.class, value)); return true;
- case "excludepatterns":
- case "excludePatterns":
target.setExcludePatterns(property(camelContext, java.lang.String.class,
value)); return true;
- case "traceformat":
- case "traceFormat": target.setTraceFormat(property(camelContext,
java.lang.String.class, value)); return true;
- case "traceprocessors":
- case "traceProcessors":
target.setTraceProcessors(property(camelContext, boolean.class, value)); return
true;
- default: return false;
- }
- }
-
- @Override
- public Map<String, Object> getAllOptions(Object target) {
- return ALL_OPTIONS;
- }
-
- @Override
- public Class<?> getOptionType(String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "enabled": return boolean.class;
- case "excludepatterns":
- case "excludePatterns": return java.lang.String.class;
- case "traceformat":
- case "traceFormat": return java.lang.String.class;
- case "traceprocessors":
- case "traceProcessors": return boolean.class;
- default: return null;
- }
- }
-
- @Override
- public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
- org.apache.camel.main.TelemetryDevConfigurationProperties target =
(org.apache.camel.main.TelemetryDevConfigurationProperties) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "enabled": return target.isEnabled();
- case "excludepatterns":
- case "excludePatterns": return target.getExcludePatterns();
- case "traceformat":
- case "traceFormat": return target.getTraceFormat();
- case "traceprocessors":
- case "traceProcessors": return target.isTraceProcessors();
- default: return null;
- }
- }
-}
-
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 5c7e763fe91..0c820eb09e6 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
@@ -79,7 +79,6 @@
{ "name": "camel.main.jmxManagementRegisterRoutesCreateByTemplate",
"description": "Whether routes created by route templates (not Kamelets) should
be registered for JMX management. Enabling this allows to have fine-grained
monitoring and management of every route created via route templates. This is
default enabled (unlike Kamelets) as routes created via templates is regarded
as standard routes, and should be available for management and monitoring.",
"sourceType": "org.apache.camel [...]
{ "name": "camel.main.jmxManagementStatisticsLevel", "description": "Sets
the JMX statistics level, the level can be set to Extended to gather additional
information The default value is Default.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "object",
"javaType": "org.apache.camel.ManagementStatisticsLevel", "defaultValue":
"Default", "enum": [ "Extended", "Default", "RoutesOnly", "Off" ] },
{ "name": "camel.main.jmxUpdateRouteEnabled", "description": "Whether to
allow updating routes at runtime via JMX using the ManagedRouteMBean. This is
disabled by default, but can be enabled for development and troubleshooting
purposes, such as updating routes in an existing running Camel via JMX and
other tools.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
- { "name": "camel.main.lightweight", "description": "Configure the context
to be lightweight. This will trigger some optimizations and memory reduction
options. Lightweight context have some limitations. At this moment, dynamic
endpoint destinations are not supported.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
{ "name": "camel.main.loadHealthChecks", "description": "Whether to load
custom health checks by scanning classpath.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
{ "name": "camel.main.loadStatisticsEnabled", "description": "Sets whether
Camel load (inflight messages, not cpu) statistics is enabled (something like
the unix load average). The statistics requires to have camel-management on the
classpath as JMX is required. The default value is false.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
{ "name": "camel.main.loadTypeConverters", "description": "Whether to load
custom type converters by scanning classpath. This is used for backwards
compatibility with Camel 2.x. Its recommended to migrate to use fast type
converter loading by setting Converter(loader = true) on your custom type
converter classes.", "sourceType":
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean",
"javaType": "boolean", "defaultValue": "false" },
diff --git a/core/camel-main/src/main/docs/main.adoc
b/core/camel-main/src/main/docs/main.adoc
index 46b36fef413..6f8138ba3cb 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -19,7 +19,7 @@ The following tables lists all the options:
// main options: START
=== Camel Main configurations
-The camel.main supports 123 options, which are listed below.
+The camel.main supports 122 options, which are listed below.
[width="100%",cols="2,5,^1,2",options="header"]
|===
@@ -79,7 +79,6 @@ The camel.main supports 123 options, which are listed below.
| *camel.main.jmxManagement{zwsp}RegisterRoutesCreateByTemplate* | Whether
routes created by route templates (not Kamelets) should be registered for JMX
management. Enabling this allows to have fine-grained monitoring and management
of every route created via route templates. This is default enabled (unlike
Kamelets) as routes created via templates is regarded as standard routes, and
should be available for management and monitoring. | true | boolean
| *camel.main.jmxManagement{zwsp}StatisticsLevel* | Sets the JMX statistics
level, the level can be set to Extended to gather additional information The
default value is Default. | Default | ManagementStatisticsLevel
| *camel.main.jmxUpdateRoute{zwsp}Enabled* | Whether to allow updating routes
at runtime via JMX using the ManagedRouteMBean. This is disabled by default,
but can be enabled for development and troubleshooting purposes, such as
updating routes in an existing running Camel via JMX and other tools. | false |
boolean
-| *camel.main.lightweight* | Configure the context to be lightweight. This
will trigger some optimizations and memory reduction options. Lightweight
context have some limitations. At this moment, dynamic endpoint destinations
are not supported. | false | boolean
| *camel.main.loadHealthChecks* | Whether to load custom health checks by
scanning classpath. | false | boolean
| *camel.main.loadStatistics{zwsp}Enabled* | Sets whether Camel load (inflight
messages, not cpu) statistics is enabled (something like the unix load
average). The statistics requires to have camel-management on the classpath as
JMX is required. The default value is false. | false | boolean
| *camel.main.loadTypeConverters* | Whether to load custom type converters by
scanning classpath. This is used for backwards compatibility with Camel 2.x.
Its recommended to migrate to use fast type converter loading by setting
Converter(loader = true) on your custom type converter classes. | false |
boolean
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 5ffad5435c3..c489c7b6c83 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
@@ -130,7 +130,6 @@ public abstract class DefaultConfigurationProperties<T> {
@Metadata(defaultValue = "true")
private boolean routesReloadRemoveAllRoutes = true;
private boolean routesReloadRestartDuration;
- private boolean lightweight;
@Metadata(defaultValue = "default", enums = "default,prototype,pooled")
private String exchangeFactory = "default";
private int exchangeFactoryCapacity = 100;
@@ -1396,18 +1395,6 @@ public abstract class DefaultConfigurationProperties<T> {
this.jmxUpdateRouteEnabled = jmxUpdateRouteEnabled;
}
- public boolean isLightweight() {
- return lightweight;
- }
-
- /**
- * Configure the context to be lightweight. This will trigger some
optimizations and memory reduction options.
- * Lightweight context have some limitations. At this moment, dynamic
endpoint destinations are not supported.
- */
- public void setLightweight(boolean lightweight) {
- this.lightweight = lightweight;
- }
-
public String getExchangeFactory() {
return exchangeFactory;
}
@@ -2582,18 +2569,6 @@ public abstract class DefaultConfigurationProperties<T> {
return (T) this;
}
- /**
- * Configure the context to be lightweight. This will trigger some
optimizations and memory reduction options.
- * <p/>
- * Lightweight context have some limitations. At the moment, dynamic
endpoint destinations are not supported. Also,
- * this should only be done on a JVM with a single Camel application
(microservice like camel-main, camel-quarkus,
- * camel-spring-boot). As this affects the entire JVM where Camel JARs are
on the classpath.
- */
- public T withLightweight(boolean lightweight) {
- this.lightweight = lightweight;
- return (T) this;
- }
-
/**
* Controls whether to pool (reuse) exchanges or create new fresh
exchanges (default). Using pooled will reduce JVM
* garbage collection overhead by avoiding to re-create Exchange instances
per message each consumer receives.
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
index d001043dc24..1b49530f034 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_11.adoc
@@ -6,6 +6,10 @@ from both 4.0 to 4.1 and 4.1 to 4.2.
== Upgrading Camel 4.10 to 4.11
+=== camel-main
+
+Remove the deprecated `camel.main.lightweight` option that was not in use.
+
=== file based components
The file based component such as `camel-file`, `camel-ftp`, `camel-smb`, and
`camel-azure-files` has