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 f01542d25b6a CAMEL-25117: camel-spring-xml - XML camelContext
configuration and JAXB dumper: fix bugs found in a deep review (#27023)
f01542d25b6a is described below
commit f01542d25b6a7baa0c0f1c984e2d7c2e714be7b3
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Sep 28 23:21:09 2026 +0200
CAMEL-25117: camel-spring-xml - XML camelContext configuration and JAXB
dumper: fix bugs found in a deep review (#27023)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../apache/camel/catalog/schemas/camel-spring.xsd | 2 +-
.../camel/spring/xml/CamelContextFactoryBean.java | 2 +-
.../spring/xml/handler/CamelNamespaceHandler.java | 6 ++
.../camel/spring/JMXAgentPropertiesTest.java | 8 +++
.../SpringCamelContextConfigurationTest.java} | 30 ++++----
...SpringCamelContextPropertyPlaceholderTest.java} | 28 ++++----
.../SpringResilienceConfigurationTest.java} | 40 ++++++-----
.../SpringStreamCachingSpoolRuleNotFoundTest.java} | 36 +++++-----
.../processor/SpringStreamCachingStrategyTest.java | 4 +-
.../SpringCamelContextConfigurationTest.xml} | 26 +++----
...gCamelContextPropertyPlaceholderTest.properties | 20 ++++++
.../SpringCamelContextPropertyPlaceholderTest.xml} | 26 +++----
.../SpringResilienceConfigurationTest.xml} | 27 +++----
.../camel/spring/jmxConfigUsingProperties.xml | 3 +-
.../SpringStreamCachingSpoolRuleNotFoundTest.xml} | 27 +++----
.../core/xml/AbstractCamelContextFactoryBean.java | 41 ++++++-----
.../AbstractCamelRedeliveryPolicyFactoryBean.java | 4 +-
.../util/JaxbDumpModelAsXmlSourceLocationTest.java | 84 ++++++++++++++++++++++
.../java/org/apache/camel/xml/jaxb/JaxbHelper.java | 7 +-
.../camel/xml/jaxb/JaxbModelToXMLDumper.java | 8 +--
.../ROOT/pages/camel-4x-upgrade-guide-4_23.adoc | 17 +++++
21 files changed, 282 insertions(+), 164 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 48bfc937bc81..ac1f0016ee7c 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -17275,7 +17275,7 @@ URI of the Endpoint used for validation.
<xs:element minOccurs="0" name="defaultResilience4jConfiguration"
type="tns:resilience4JConfigurationDefinition"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:resilience4jConfiguration"/>
<xs:element minOccurs="0" name="defaultFaultToleranceConfiguration"
type="tns:faultToleranceConfigurationDefinition"/>
- <xs:element maxOccurs="unbounded" minOccurs="0"
name="faultToleranceConfiguration"
type="tns:resilience4JConfigurationDefinition"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:faultToleranceConfiguration"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:routeConfigurationContextRef"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:routeTemplateContextRef"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:routeBuilder"/>
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
b/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
index d4f44634df35..a0197f3217fa 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
@@ -230,7 +230,7 @@ public class CamelContextFactoryBean extends
AbstractCamelContextFactoryBean<Spr
private List<Resilience4jConfigurationDefinition>
resilience4jConfigurations;
@XmlElement(name = "defaultFaultToleranceConfiguration")
private FaultToleranceConfigurationDefinition
defaultFaultToleranceConfiguration;
- @XmlElement(name = "faultToleranceConfiguration", type =
Resilience4jConfigurationDefinition.class)
+ @XmlElement(name = "faultToleranceConfiguration", type =
FaultToleranceConfigurationDefinition.class)
private List<FaultToleranceConfigurationDefinition>
faultToleranceConfigurations;
@XmlElement(name = "routeConfigurationContextRef")
private List<RouteConfigurationContextRefDefinition>
routeConfigurationRefs = new ArrayList<>();
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
b/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
index c37078b79a5a..fb35bba76b8f 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/handler/CamelNamespaceHandler.java
@@ -476,6 +476,12 @@ public class CamelNamespaceHandler extends
NamespaceHandlerSupport {
builder.addPropertyValue("camelJMXAgent",
factoryBean.getCamelJMXAgent());
builder.addPropertyValue("camelStreamCachingStrategy",
factoryBean.getCamelStreamCachingStrategy());
builder.addPropertyValue("camelRouteController",
factoryBean.getCamelRouteController());
+ builder.addPropertyValue("defaultResilience4jConfiguration",
+ factoryBean.getDefaultResilience4jConfiguration());
+ builder.addPropertyValue("resilience4jConfigurations",
factoryBean.getResilience4jConfigurations());
+ builder.addPropertyValue("defaultFaultToleranceConfiguration",
+ factoryBean.getDefaultFaultToleranceConfiguration());
+ builder.addPropertyValue("faultToleranceConfigurations",
factoryBean.getFaultToleranceConfigurations());
builder.addPropertyValue("threadPoolProfiles",
factoryBean.getThreadPoolProfiles());
builder.addPropertyValue("beansFactory",
factoryBean.getBeansFactory());
builder.addPropertyValue("beans", factoryBean.getBeans());
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
index d69824c58943..8df58e4a9a17 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
@@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
@@ -42,4 +43,11 @@ public class JMXAgentPropertiesTest extends
DefaultJMXAgentTest {
assertTrue(agent.getUseHostIPAddress());
}
+ @Test
+ public void testMBeanServerDefaultDomain() throws Exception {
+ CamelContext ctx = createCamelContext();
+ ManagementAgent agent =
ctx.getManagementStrategy().getManagementAgent();
+ assertEquals("myDomain", agent.getMBeanServerDefaultDomain());
+ }
+
}
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.java
similarity index 57%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
copy to
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.java
index d69824c58943..4c88c3bdd4c6 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.java
@@ -14,32 +14,34 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.spring;
+package org.apache.camel.spring.impl;
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ManagementAgent;
+import org.apache.camel.spi.SupervisingRouteController;
+import org.apache.camel.spring.SpringTestSupport;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
-/**
- * Test that verifies JMX properties can be configured via Spring.
- */
-public class JMXAgentPropertiesTest extends DefaultJMXAgentTest {
+public class SpringCamelContextConfigurationTest extends SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
- return new
ClassPathXmlApplicationContext("org/apache/camel/spring/jmxConfigUsingProperties.xml");
+ return new
ClassPathXmlApplicationContext("org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.xml");
}
@Test
- public void testEnableUseHostIPAddress() throws Exception {
- CamelContext ctx = createCamelContext();
- ManagementAgent agent =
ctx.getManagementStrategy().getManagementAgent();
- agent.start();
- assertTrue(agent.getUseHostIPAddress());
+ public void testStreamCaching() {
+ // streamCaching enabled=false turns off stream caching
+ assertFalse(context.isStreamCaching());
+ assertFalse(context.getStreamCachingStrategy().isEnabled());
+ assertEquals(4096, context.getStreamCachingStrategy().getBufferSize());
}
+ @Test
+ public void testRouteControllerNotSupervising() {
+ assertFalse(context.getRouteController() instanceof
SupervisingRouteController);
+ }
}
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.java
similarity index 59%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
copy to
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.java
index d69824c58943..7703da93f30e 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.java
@@ -14,32 +14,34 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.spring;
+package org.apache.camel.spring.impl;
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ManagementAgent;
+import org.apache.camel.LoggingLevel;
+import org.apache.camel.processor.errorhandler.RedeliveryPolicy;
+import org.apache.camel.spring.SpringTestSupport;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
-/**
- * Test that verifies JMX properties can be configured via Spring.
- */
-public class JMXAgentPropertiesTest extends DefaultJMXAgentTest {
+public class SpringCamelContextPropertyPlaceholderTest extends
SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
- return new
ClassPathXmlApplicationContext("org/apache/camel/spring/jmxConfigUsingProperties.xml");
+ return new
ClassPathXmlApplicationContext("org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.xml");
}
@Test
- public void testEnableUseHostIPAddress() throws Exception {
- CamelContext ctx = createCamelContext();
- ManagementAgent agent =
ctx.getManagementStrategy().getManagementAgent();
- agent.start();
- assertTrue(agent.getUseHostIPAddress());
+ public void testPropertyPlaceholderOnContextOptions() {
+ assertTrue(context.isTypeConverterStatisticsEnabled());
}
+ @Test
+ public void testRedeliveryPolicyLogLevels() {
+ RedeliveryPolicy policy = applicationContext.getBean("myRedelivery",
RedeliveryPolicy.class);
+ assertEquals(LoggingLevel.WARN, policy.getRetriesExhaustedLogLevel());
+ assertEquals(LoggingLevel.INFO, policy.getRetryAttemptedLogLevel());
+ }
}
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringResilienceConfigurationTest.java
similarity index 52%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
copy to
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringResilienceConfigurationTest.java
index 44534e9c8f23..4faf2427315f 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/impl/SpringResilienceConfigurationTest.java
@@ -14,38 +14,42 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.spring.processor;
+package org.apache.camel.spring.impl;
+import org.apache.camel.model.FaultToleranceConfigurationDefinition;
+import org.apache.camel.model.ModelCamelContext;
+import org.apache.camel.model.Resilience4jConfigurationDefinition;
import org.apache.camel.spring.SpringTestSupport;
-import org.apache.camel.util.IOHelper;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
-import static org.apache.camel.util.FileUtil.normalizePath;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
-public class SpringStreamCachingStrategyTest extends SpringTestSupport {
+public class SpringResilienceConfigurationTest extends SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
- return new
ClassPathXmlApplicationContext("org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.xml");
+ return new
ClassPathXmlApplicationContext("org/apache/camel/spring/impl/SpringResilienceConfigurationTest.xml");
}
@Test
- public void testStreamCaching() {
- context.getStreamCachingStrategy().start();
+ public void testResilienceConfigurations() {
+ ModelCamelContext mcc = (ModelCamelContext) context;
- assertTrue(context.getStreamCachingStrategy().isEnabled());
- assertEquals(normalizePath("target/cachedir"),
-
normalizePath(context.getStreamCachingStrategy().getSpoolDirectory().toString()));
- assertEquals(Integer.valueOf(IOHelper.DEFAULT_BUFFER_SIZE).intValue(),
- context.getStreamCachingStrategy().getBufferSize());
- assertEquals(Long.valueOf(8192).longValue(),
context.getStreamCachingStrategy().getSpoolThreshold());
- assertEquals("java.io.ByteArrayInputStream",
-
context.getStreamCachingStrategy().getAllowClasses().iterator().next().getName());
- assertEquals("java.io.Reader",
context.getStreamCachingStrategy().getDenyClasses().iterator().next().getName());
- }
+ Resilience4jConfigurationDefinition r4j =
mcc.getResilience4jConfiguration(null);
+ assertNotNull(r4j);
+ assertEquals("40", r4j.getFailureRateThreshold());
+ r4j = mcc.getResilience4jConfiguration("myR4j");
+ assertNotNull(r4j);
+ assertEquals("25", r4j.getFailureRateThreshold());
+ FaultToleranceConfigurationDefinition ft =
mcc.getFaultToleranceConfiguration(null);
+ assertNotNull(ft);
+ assertEquals("3000", ft.getDelay());
+ ft = mcc.getFaultToleranceConfiguration("myFt");
+ assertNotNull(ft);
+ assertEquals("2000", ft.getDelay());
+ }
}
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.java
similarity index 55%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
copy to
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.java
index d69824c58943..6021a9f4b945 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/JMXAgentPropertiesTest.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.java
@@ -14,32 +14,30 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.spring;
+package org.apache.camel.spring.processor;
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ManagementAgent;
import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
-/**
- * Test that verifies JMX properties can be configured via Spring.
- */
-public class JMXAgentPropertiesTest extends DefaultJMXAgentTest {
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new
ClassPathXmlApplicationContext("org/apache/camel/spring/jmxConfigUsingProperties.xml");
- }
+public class SpringStreamCachingSpoolRuleNotFoundTest {
@Test
- public void testEnableUseHostIPAddress() throws Exception {
- CamelContext ctx = createCamelContext();
- ManagementAgent agent =
ctx.getManagementStrategy().getManagementAgent();
- agent.start();
- assertTrue(agent.getUseHostIPAddress());
+ public void testSpoolRuleNotFound() {
+ Exception e = assertThrows(Exception.class, () -> {
+ try (ClassPathXmlApplicationContext ac = new
ClassPathXmlApplicationContext(
+
"org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.xml"))
{
+ // expected to throw
+ }
+ });
+ Throwable t = e;
+ boolean found = false;
+ while (t != null && !found) {
+ found = t.getMessage() != null &&
t.getMessage().contains("myUnknownRule");
+ t = t.getCause();
+ }
+ assertTrue(found, "Should report the unknown spool rule");
}
-
}
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
index 44534e9c8f23..e1cd53e4f437 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringStreamCachingStrategyTest.java
@@ -17,7 +17,6 @@
package org.apache.camel.spring.processor;
import org.apache.camel.spring.SpringTestSupport;
-import org.apache.camel.util.IOHelper;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -40,8 +39,7 @@ public class SpringStreamCachingStrategyTest extends
SpringTestSupport {
assertTrue(context.getStreamCachingStrategy().isEnabled());
assertEquals(normalizePath("target/cachedir"),
normalizePath(context.getStreamCachingStrategy().getSpoolDirectory().toString()));
- assertEquals(Integer.valueOf(IOHelper.DEFAULT_BUFFER_SIZE).intValue(),
- context.getStreamCachingStrategy().getBufferSize());
+ assertEquals(2048, context.getStreamCachingStrategy().getBufferSize());
assertEquals(Long.valueOf(8192).longValue(),
context.getStreamCachingStrategy().getSpoolThreshold());
assertEquals("java.io.ByteArrayInputStream",
context.getStreamCachingStrategy().getAllowClasses().iterator().next().getName());
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.xml
similarity index 64%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
copy to
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.xml
index 5557e7c574fd..aebf9381532e 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextConfigurationTest.xml
@@ -24,22 +24,14 @@
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <!-- START SNIPPET: e1 -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <propertyPlaceholder id="properties"
location="org/apache/camel/spring/jmx.properties"/>
-
- <!-- we can use property placeholders when we define the JMX agent -->
- <jmxAgent id="agent" disabled="{{myjmx.disabled}}"
- usePlatformMBeanServer="{{myjmx.usePlatform}}"
- statisticsLevel="RoutesOnly"
- useHostIPAddress="true"/>
-
- <route id="foo" autoStartup="false">
- <from uri="seda:start"/>
- <to uri="mock:result"/>
- </route>
-
- </camelContext>
- <!-- END SNIPPET: e1 -->
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+ <streamCaching id="myCache" enabled="false" bufferSize="4096"/>
+ <jmxAgent id="jmx" disabled="true"/>
+ <routeController id="myController" supervising="false" initialDelay="100"/>
+ <route id="foo">
+ <from uri="direct:foo"/>
+ <to uri="mock:foo"/>
+ </route>
+ </camelContext>
</beans>
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.properties
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.properties
new file mode 100644
index 000000000000..a216898a6c7f
--- /dev/null
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.properties
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+
+myStats=true
+myLevel=WARN
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.xml
similarity index 64%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
copy to
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.xml
index 5557e7c574fd..a0d99995699d 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.xml
@@ -24,22 +24,14 @@
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <!-- START SNIPPET: e1 -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <propertyPlaceholder id="properties"
location="org/apache/camel/spring/jmx.properties"/>
-
- <!-- we can use property placeholders when we define the JMX agent -->
- <jmxAgent id="agent" disabled="{{myjmx.disabled}}"
- usePlatformMBeanServer="{{myjmx.usePlatform}}"
- statisticsLevel="RoutesOnly"
- useHostIPAddress="true"/>
-
- <route id="foo" autoStartup="false">
- <from uri="seda:start"/>
- <to uri="mock:result"/>
- </route>
-
- </camelContext>
- <!-- END SNIPPET: e1 -->
+ <camelContext typeConverterStatisticsEnabled="{{myStats}}"
xmlns="http://camel.apache.org/schema/spring">
+ <propertyPlaceholder id="properties"
+
location="classpath:org/apache/camel/spring/impl/SpringCamelContextPropertyPlaceholderTest.properties"/>
+ <redeliveryPolicyProfile id="myRedelivery"
retriesExhaustedLogLevel="{{myLevel}}" retryAttemptedLogLevel="INFO"/>
+ <route id="foo">
+ <from uri="direct:foo"/>
+ <to uri="mock:foo"/>
+ </route>
+ </camelContext>
</beans>
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringResilienceConfigurationTest.xml
similarity index 64%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
copy to
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringResilienceConfigurationTest.xml
index 5557e7c574fd..276c56b5669e 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/SpringResilienceConfigurationTest.xml
@@ -24,22 +24,15 @@
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <!-- START SNIPPET: e1 -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <propertyPlaceholder id="properties"
location="org/apache/camel/spring/jmx.properties"/>
-
- <!-- we can use property placeholders when we define the JMX agent -->
- <jmxAgent id="agent" disabled="{{myjmx.disabled}}"
- usePlatformMBeanServer="{{myjmx.usePlatform}}"
- statisticsLevel="RoutesOnly"
- useHostIPAddress="true"/>
-
- <route id="foo" autoStartup="false">
- <from uri="seda:start"/>
- <to uri="mock:result"/>
- </route>
-
- </camelContext>
- <!-- END SNIPPET: e1 -->
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+ <defaultResilience4jConfiguration id="myDefaultR4j"
failureRateThreshold="40"/>
+ <resilience4jConfiguration id="myR4j" failureRateThreshold="25"/>
+ <defaultFaultToleranceConfiguration id="myDefaultFt" delay="3000"/>
+ <faultToleranceConfiguration id="myFt" delay="2000"/>
+ <route id="foo">
+ <from uri="direct:foo"/>
+ <to uri="mock:foo"/>
+ </route>
+ </camelContext>
</beans>
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
index 5557e7c574fd..f29ecdf4fdd0 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
@@ -32,7 +32,8 @@
<jmxAgent id="agent" disabled="{{myjmx.disabled}}"
usePlatformMBeanServer="{{myjmx.usePlatform}}"
statisticsLevel="RoutesOnly"
- useHostIPAddress="true"/>
+ useHostIPAddress="true"
+ mbeanServerDefaultDomain="myDomain"/>
<route id="foo" autoStartup="false">
<from uri="seda:start"/>
diff --git
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.xml
similarity index 64%
copy from
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
copy to
components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.xml
index 5557e7c574fd..aea3614e91c7 100644
---
a/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/jmxConfigUsingProperties.xml
+++
b/components/camel-spring-parent/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/SpringStreamCachingSpoolRuleNotFoundTest.xml
@@ -24,22 +24,15 @@
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
">
- <!-- START SNIPPET: e1 -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <propertyPlaceholder id="properties"
location="org/apache/camel/spring/jmx.properties"/>
-
- <!-- we can use property placeholders when we define the JMX agent -->
- <jmxAgent id="agent" disabled="{{myjmx.disabled}}"
- usePlatformMBeanServer="{{myjmx.usePlatform}}"
- statisticsLevel="RoutesOnly"
- useHostIPAddress="true"/>
-
- <route id="foo" autoStartup="false">
- <from uri="seda:start"/>
- <to uri="mock:result"/>
- </route>
-
- </camelContext>
- <!-- END SNIPPET: e1 -->
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+ <streamCaching id="myCacheConfig" spoolRules="myUnknownRule"/>
+
+ <route>
+ <from uri="direct:c"/>
+ <to uri="mock:c"/>
+ </route>
+
+ </camelContext>
</beans>
diff --git
a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 46db2c59ca8c..549de0dcb4bb 100644
---
a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++
b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -197,6 +197,13 @@ public abstract class AbstractCamelContextFactoryBean<T
extends ModelCamelContex
// set the package scan resolver as soon as possible
setupPackageScanResolver();
+ // set the custom registry if defined
+ initCustomRegistry(getContext());
+
+ // setup property placeholder so we got it as early as possible
+ // (before the options below that can use property placeholders)
+ initPropertyPlaceholder();
+
// also set type converter registry as early as possible
setupTypeConverters();
@@ -206,12 +213,6 @@ public abstract class AbstractCamelContextFactoryBean<T
extends ModelCamelContex
// then set custom properties
setCustomProperties();
- // set the custom registry if defined
- initCustomRegistry(getContext());
-
- // setup property placeholder so we got it as early as possible
- initPropertyPlaceholder();
-
// then setup JMX
initJMXAgent();
@@ -492,7 +493,7 @@ public abstract class AbstractCamelContextFactoryBean<T
extends ModelCamelContex
BacklogTracer backlogTracer = getBeanForType(BacklogTracer.class);
if (backlogTracer != null) {
LOG.info("Using custom BacklogTracer: {}", backlogTracer);
- getContext().addService(backlogTracer);
+
getContext().getCamelContextExtension().addContextPlugin(BacklogTracer.class,
backlogTracer);
}
InflightRepository inflightRepository =
getBeanForType(InflightRepository.class);
if (inflightRepository != null) {
@@ -851,22 +852,28 @@ public abstract class AbstractCamelContextFactoryBean<T
extends ModelCamelContex
.mandatoryConvertTo(ManagementMBeansLevel.class, level);
properties.put("mBeansLevel", mbLevel);
}
+ if (camelJMXAgent.getMbeanServerDefaultDomain() != null) {
+ properties.put("mBeanServerDefaultDomain",
+ CamelContextHelper.parseText(getContext(),
camelJMXAgent.getMbeanServerDefaultDomain()));
+ }
return properties;
}
protected void initStreamCachingStrategy() throws Exception {
CamelStreamCachingStrategyDefinition streamCaching =
getCamelStreamCachingStrategy();
if (streamCaching == null) {
- getContext().getStreamCachingStrategy().setEnabled(true);
return;
}
+ // the strategy is enabled by the camel context when it starts if
stream caching is in use,
+ // so the enabled option turns stream caching on/off (unless the
streamCache attribute is set)
Boolean enabled = CamelContextHelper.parseBoolean(getContext(),
streamCaching.getEnabled());
- if (enabled != null) {
- getContext().getStreamCachingStrategy().setEnabled(enabled);
- } else {
- // stream-caching is default enabled
- getContext().getStreamCachingStrategy().setEnabled(true);
+ if (enabled != null && getStreamCache() == null) {
+ getContext().setStreamCaching(enabled);
+ }
+ Integer bufferSize = CamelContextHelper.parseInteger(getContext(),
streamCaching.getBufferSize());
+ if (bufferSize != null) {
+ getContext().getStreamCachingStrategy().setBufferSize(bufferSize);
}
String allowClasses = CamelContextHelper.parseText(getContext(),
streamCaching.getAllowClasses());
if (allowClasses != null) {
@@ -919,11 +926,9 @@ public abstract class AbstractCamelContextFactoryBean<T
extends ModelCamelContex
String spoolRules = CamelContextHelper.parseText(getContext(),
streamCaching.getSpoolRules());
if (spoolRules != null) {
for (String name : ObjectHelper.createIterable(spoolRules)) {
- StreamCachingStrategy.SpoolRule rule =
getContext().getRegistry().lookupByNameAndType(name,
+ StreamCachingStrategy.SpoolRule rule =
CamelContextHelper.mandatoryLookup(getContext(), name,
StreamCachingStrategy.SpoolRule.class);
- if (rule != null) {
- getContext().getStreamCachingStrategy().addSpoolRule(rule);
- }
+ getContext().getStreamCachingStrategy().addSpoolRule(rule);
}
}
}
@@ -945,7 +950,7 @@ public abstract class AbstractCamelContextFactoryBean<T
extends ModelCamelContex
SupervisingRouteController src = null;
Boolean enabled = CamelContextHelper.parseBoolean(getContext(),
rc.getSupervising());
- if (enabled != null) {
+ if (enabled != null && enabled) {
src = getContext().getRouteController().supervising();
}
String includeRoutes = CamelContextHelper.parseText(getContext(),
rc.getIncludeRoutes());
diff --git
a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
index 0d865c833b9e..9f661595dfd0 100644
---
a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
+++
b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelRedeliveryPolicyFactoryBean.java
@@ -143,10 +143,10 @@ public abstract class
AbstractCamelRedeliveryPolicyFactoryBean extends AbstractC
}
}
if (retriesExhaustedLogLevel != null) {
-
answer.setRetriesExhaustedLogLevel(LoggingLevel.valueOf(retriesExhaustedLogLevel));
+
answer.setRetriesExhaustedLogLevel(CamelContextHelper.parse(context,
LoggingLevel.class, retriesExhaustedLogLevel));
}
if (retryAttemptedLogLevel != null) {
-
answer.setRetryAttemptedLogLevel(LoggingLevel.valueOf(retryAttemptedLogLevel));
+ answer.setRetryAttemptedLogLevel(CamelContextHelper.parse(context,
LoggingLevel.class, retryAttemptedLogLevel));
}
if (retryAttemptedLogInterval != null) {
answer.setRetryAttemptedLogInterval(CamelContextHelper.parseInteger(context,
retryAttemptedLogInterval));
diff --git
a/core/camel-core/src/test/java/org/apache/camel/util/JaxbDumpModelAsXmlSourceLocationTest.java
b/core/camel-core/src/test/java/org/apache/camel/util/JaxbDumpModelAsXmlSourceLocationTest.java
new file mode 100644
index 000000000000..26be26265b39
--- /dev/null
+++
b/core/camel-core/src/test/java/org/apache/camel/util/JaxbDumpModelAsXmlSourceLocationTest.java
@@ -0,0 +1,84 @@
+/*
+ * 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.util;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.xml.jaxb.JaxbModelToXMLDumper;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * The JAXB based dumper includes the source location when asked for, also
when not debugging.
+ */
+public class JaxbDumpModelAsXmlSourceLocationTest extends ContextTestSupport {
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+ CamelContext context = super.createCamelContext();
+ context.setSourceLocationEnabled(true);
+ context.getPropertiesComponent().addInitialProperty("myUri",
"mock:result");
+ return context;
+ }
+
+ @Test
+ public void testDumpModelAsXml() throws Exception {
+ String xml = new JaxbModelToXMLDumper().dumpModelAsXml(context,
+ context.getRouteDefinition("myRoute"), false, false, true);
+ assertNotNull(xml);
+ log.info(xml);
+
+
Assertions.assertTrue(xml.contains("sourceLocation=\"JaxbDumpModelAsXmlSourceLocationTest.java\""),
xml);
+ }
+
+ @Test
+ public void testDumpModelAsXmlResolvePlaceholders() throws Exception {
+ String xml = new JaxbModelToXMLDumper().dumpModelAsXml(context,
+ context.getRouteDefinition("myRoute"), true, false, true);
+ assertNotNull(xml);
+ log.info(xml);
+
+ Assertions.assertTrue(xml.contains("uri=\"mock:result\""), xml);
+
Assertions.assertTrue(xml.contains("sourceLocation=\"JaxbDumpModelAsXmlSourceLocationTest.java\""),
xml);
+ }
+
+ @Test
+ public void testDumpModelAsXmlNoSourceLocation() throws Exception {
+ String xml = new JaxbModelToXMLDumper().dumpModelAsXml(context,
+ context.getRouteDefinition("myRoute"), true, false, false);
+ assertNotNull(xml);
+ log.info(xml);
+
+ Assertions.assertFalse(xml.contains("sourceLocation="), xml);
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:start").routeId("myRoute")
+ .filter(simple("${body} > 10"))
+ .to("{{myUri}}");
+ }
+ };
+ }
+
+}
diff --git
a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
index 236c95cb9a9a..510ced30b751 100644
---
a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
+++
b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbHelper.java
@@ -325,6 +325,11 @@ public final class JaxbHelper {
}
public static <T extends NamedNode> T modelToXml(CamelContext context,
String xml, Class<T> type) throws Exception {
+ return modelToXml(context, xml, type, false);
+ }
+
+ public static <T extends NamedNode> T modelToXml(CamelContext context,
String xml, Class<T> type, boolean sourceLocation)
+ throws Exception {
JAXBContext jaxbContext = getJAXBContext(context);
XmlConverter xmlConverter = newXmlConverter(context);
@@ -339,7 +344,7 @@ public final class JaxbHelper {
}
Map<String, KeyValueHolder<Integer, String>> locations = new
HashMap<>();
- if (context.isDebugging()) {
+ if (sourceLocation || context.isDebugging()) {
extractSourceLocations(dom.getDocumentElement(), locations);
}
Map<String, String> namespaces = new LinkedHashMap<>();
diff --git
a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java
b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java
index 8d469589b7f4..b7e3bbad885d 100644
---
a/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java
+++
b/core/camel-xml-jaxb/src/main/java/org/apache/camel/xml/jaxb/JaxbModelToXMLDumper.java
@@ -56,7 +56,6 @@ import org.apache.camel.spi.ModelToXMLDumper;
import org.apache.camel.spi.PropertiesComponent;
import org.apache.camel.spi.annotations.JdkService;
import org.apache.camel.support.ObjectHelper;
-import org.apache.camel.support.PluginHelper;
import org.apache.camel.util.KeyValueHolder;
import org.apache.camel.util.StringHelper;
import org.apache.camel.util.xml.XmlLineNumberParser;
@@ -140,7 +139,7 @@ public class JaxbModelToXMLDumper implements
ModelToXMLDumper {
throw new TypeConversionException(xml, Document.class, e);
}
- if (context.isDebugging()) {
+ if (sourceLocation || context.isDebugging()) {
enrichLocations(dom, locations);
}
sanitizeXml(dom, generatedIds);
@@ -222,9 +221,8 @@ public class JaxbModelToXMLDumper implements
ModelToXMLDumper {
// replaced so re-create the model
if (changed.get()) {
xml =
context.getTypeConverter().mandatoryConvertTo(String.class, dom);
- NamedNode copy = modelToXml(context, xml, NamedNode.class);
- xml =
PluginHelper.getModelToXMLDumper(context).dumpModelAsXml(context, copy, false,
generatedIds,
- sourceLocation);
+ NamedNode copy = modelToXml(context, xml, NamedNode.class,
sourceLocation);
+ xml = dumpModelAsXml(context, copy, false, generatedIds,
sourceLocation);
}
}
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
index 4a9d13e2e3ea..feb97ad4012d 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
@@ -3416,6 +3416,23 @@ Not changed: the HMAC key is still derived from the same
key material as the cip
would change the MAC written into the message and so could not be read by
earlier versions; that is
tracked separately.
+=== camel-spring-xml - routeController supervising="false"
+
+In the Spring XML `<camelContext>`, `<routeController supervising="false"/>`
previously still switched to the
+supervising route controller, as any value of the `supervising` attribute did.
The supervising route controller
+is now only used when `supervising` is `true`.
+
+=== camel-spring-xml - streamCaching enabled option
+
+In the Spring XML `<camelContext>`, the `enabled` option of `<streamCaching>`
now turns stream caching on or off
+for the routes, the same as the `streamCache` attribute on `<camelContext>`
(which takes precedence when both are set).
+Previously `<streamCaching enabled="false"/>` did not turn off stream caching.
+
+The `bufferSize` option of `<streamCaching>` is now applied; it was ignored
before.
+
+A spool rule in the `spoolRules` option that does not exist in the registry
now fails
+the startup of the Camel context, instead of being ignored.
+
=== camel-core - invalid time patterns in options are rejected
Numeric options such as `period`, `delay` or `timeout` accept a time pattern
such as `5s` or `1h30m`. An invalid