-
Notifications
You must be signed in to change notification settings - Fork 82
ACS 7 Migration Guide
This page describes guidelines to migrate the code written on top of ACS to support the latest libraries included in 7.0 release.
Content:
Spring has been upgraded to 5.3.2
-
MockHttpServletResponse
- contentType property is now updated viaMockHttpServletResponse::setCharacterEncoding()
. Any tests usingMockHttpServletResponse
need to update existing assertions on contentType, e.g:
- assertThat(response.getContentType()).isEqualTo("test/plain");
+ assertThat(response.getContentType()).isEqualTo("test/plain;charset=UTF-8");
-
Spring’s
SQLExceptionTranslator
implementations do not throw a fallbackUncategorizedSQLException
anymore but rather leave this up to the caller. However, it may still be thrown by custom translators, therefore it is a good idea to verify that before updating any code. -
New method has been introduced in
org.springframework.transaction.interceptor.TransactionAttribute
. Classes implementing it will also need to implement:
Collection<String> getLabels();
Camel has been upgraded to 3.7.0
-
camel-core has been split into multiple jars. With Maven, you can either use only the dependencies on the modules you need, or directly camel-core, as it has transitive dependencies on all of its modules, except for camel-main.
-
Many of the core components have been moved out of camel-core to individual components. Thus, for each endpoint prefix we need to add its corresponding maven dependency, e.g. "direct:alfresco.default" endpoint needs camel-direct.
-
Default value of
useBreadcrumb
in camel context has changed tofalse
with camel 3. Configuration snippet below:
<camelContext id="alfrescoCamelContext" xmlns="http://camel.apache.org/schema/spring" useBreadcrumb="true">
<contextScan/>
<camel:jmxAgent id="agent" mbeanObjectDomainName="Alfresco.Camel" />
<template id="camelProducerTemplate" defaultEndpoint="direct:alfresco.default" />
</camelContext>
- The jms, activemq and amqp components are now all explicitly declared in Alfresco Repository's default messaging context configuration and they all use one common configuration (one shared connection factory, one shared transaction manager):
<bean id="jmsConfig" class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="pooledConnectionFactory" />
<property name="transacted" value="${messaging.transacted}" />
<property name="transactionManager" ref="messagingTransactionManager" />
</bean>
- The Camel Context configuration is now exposed through JMX at Camel's default
org.apache.camel
domain namespace, instead ofAlfresco.Camel
.
Save for the Servlet API libraries which remained at the javax.servlet:javax.servlet-api:3.0.1
version, all other JavaX libraries in ACS have been replaced with their Jakarta equivalent. With that said, there were only minor version upgrades on these libraries and in spite of the JAR library name changes, their internal Java packages have remained the same (the javax.[...]
namespaces are still the ones used). Therefore, the switch from JavaX to Jakarta libraries will not affect Java code imports.