238 lines
9.7 KiB
XML
238 lines
9.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="migration-2.1-2.2"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Changes between 2.1 and 2.2</title>
|
|
<section id="2.2-new-components">
|
|
<title>New Components</title>
|
|
<section id="2.2-redis-store-adapters">
|
|
<title>RedisStore Inbound and Outbound Channel Adapters</title>
|
|
<para>
|
|
Spring Integration now has RedisStore Inbound and Outbound Channel Adapters
|
|
allowing you to write and read Message payloads to/from Redis collection(s).
|
|
For more information please see
|
|
<xref linkend="redis-store-outbound-channel-adapter"/> and
|
|
<xref linkend="redis-store-inbound-channel-adapter"/>.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-mongo-adapters">
|
|
<title>MongoDB Inbound and Outbound Channel Adapters</title>
|
|
<para>
|
|
Spring Integration now has MongoDB Inbound and Outbound Channel Adapters
|
|
allowing you to write and read Message payloads to/from a MongoDB document store.
|
|
For more information please see
|
|
<xref linkend="mongodb-outbound-channel-adapter"/> and
|
|
<xref linkend="mongodb-inbound-channel-adapter"/>.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-jpa">
|
|
<title>JPA Endpoints</title>
|
|
<para>
|
|
Spring Integration now includes components for the Java Persistence
|
|
API (JPA) for retrieving and persisting JPA entity objects. The
|
|
JPA Adapter includes the following components:
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para><emphasis><link linkend='jpa-inbound-channel-adapter'>Inbound Channel Adapter</link></emphasis></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><emphasis><link linkend='jpa-outbound-channel-adapter'>Outbound Channel Adapter</link></emphasis></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><emphasis><link linkend='jpa-updating-outbound-gateway'>Updating Outbound Gateway</link></emphasis></para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><emphasis><link linkend='jpa-retrieving-outbound-gateway'>Retrieving Outbound Gateway</link></emphasis></para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
For more information please see <xref linkend="jpa"/>
|
|
</para>
|
|
</section>
|
|
</section>
|
|
|
|
<section id="2.2-general">
|
|
<title>General Changes</title>
|
|
<section id="2.2-spring-31">
|
|
<title>Spring 3.1 Used by Default</title>
|
|
<para>
|
|
Spring Integration now uses Spring 3.1.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-handler-advice">
|
|
<title>Adding Behavior to Endpoints</title>
|
|
<para>
|
|
The ability to add an <advice-chain/> to a poller has been available for some time.
|
|
However, the behavior added by this affects the entire integration flow.
|
|
It did not address the ability to add, say, retry, to an individual
|
|
endpoint. The 2.2. release introduces the <request-handler-advice-chain/>
|
|
to many endpoints.
|
|
</para>
|
|
<para>
|
|
In addition, 3 standard Advice classes have been provided for this purpose:
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>MessageHandlerRetryAdvice</listitem>
|
|
<listitem>MessageHandlerCircuitBreakerAdvice</listitem>
|
|
<listitem>ExpressionEvaluatingMessageHandlerAdvice</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
For more information, see <xref linkend="message-handler-advice-chain"/>.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-transaction-sync">
|
|
<title>Transaction Synchronization and Pseudo Transactions</title>
|
|
<para>
|
|
Pollers can now participate in Spring's <emphasis>Transaction Synchronization</emphasis>
|
|
feature. This allows for synchronizing such operations as renaming files by an inbound channel
|
|
adapter depending on whether the transaction commits, or rolls back.
|
|
</para>
|
|
<para>
|
|
In addition, these features can be enabled when there is not a 'real' transaction present,
|
|
by means of a <classname>PseudoTransactionManager</classname>.
|
|
</para>
|
|
<para>
|
|
For more information see <xref linkend="transaction-synchronization"/>.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-file-adapter">
|
|
<title>File Adapter - Improved File Overwrite/Append Handling</title>
|
|
<para>
|
|
When using the <emphasis>File Oubound Channel Adapter</emphasis>
|
|
or the <emphasis>File Outbound Gateway</emphasis>, a new
|
|
<emphasis>mode</emphasis> property was added. Prior to
|
|
<emphasis>Spring Integration 2.2</emphasis>, target files were
|
|
replaced when they existed. Now you can specify
|
|
the following options:
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>REPLACE (Default)</listitem>
|
|
<listitem>APPEND</listitem>
|
|
<listitem>FAIL</listitem>
|
|
<listitem>IGNORE</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
For more information please see <xref linkend="file-writing-destination-exists"/>.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-outbound-gateways">
|
|
<title>Reply-Timeout added to more Outbound Gateways</title>
|
|
<para>
|
|
The XML Namespace support adds the <emphasis>reply-timeout</emphasis>
|
|
attribute to the following <emphasis>Outbound Gateways</emphasis>:
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>Amqp Outbound Gateway</listitem>
|
|
<listitem>File Outbound Gateway</listitem>
|
|
<listitem>Ftp Outbound Gateway</listitem>
|
|
<listitem>Sftp Outbound Gateway</listitem>
|
|
<listitem>Ws Outbound Gateway</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
<section id="2.2-amqp-11">
|
|
<title>Spring-AMQP 1.1</title>
|
|
<para>
|
|
Spring Integration now uses Spring AMQP 1.1. This enables several features
|
|
to be used within a Spring Integration application, including...
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>A fixed reply queue for the outbound gateway</listitem>
|
|
<listitem>HA (mirrored) queues</listitem>
|
|
<listitem>Publisher Confirms</listitem>
|
|
<listitem>Returned Messages</listitem>
|
|
<listitem>Support for Dead Letter Exchanges/Dead Letter Queues</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
<section id="2.2-jdbc-11">
|
|
<title>JDBC Support - Stored Procedures Components</title>
|
|
<para><emphasis>SpEL Support</emphasis></para>
|
|
<para>
|
|
When using the Stored Procedure components of the Spring Integration
|
|
JDBC Adapter, you can now provide Stored Procedure Names or
|
|
Stored Function Names using Spring Expression Language (SpEL).
|
|
</para>
|
|
<para>
|
|
This allows you to specify the Stored Procedures to be invoked
|
|
at runtime. For example, you can provide Stored Procedure names
|
|
that you would like to execute via Message Headers. For more
|
|
information please see <xref linkend="stored-procedures"/>.
|
|
</para>
|
|
<para><emphasis>JMX Support</emphasis></para>
|
|
<para>
|
|
The Stored Procedure components now provide basic JMX support,
|
|
exposing some of their properties as MBeans:
|
|
</para>
|
|
<itemizedlist>
|
|
<listitem>Stored Procedure Name</listitem>
|
|
<listitem>Stored Procedure Name Expression</listitem>
|
|
<listitem>JdbcCallOperations Cache Statistics</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
<section id="2.2-jdbc-gateway-update-optional">
|
|
<title>JDBC Support - Outbound Gateway</title>
|
|
<para>
|
|
When using the JDBC Outbound Gateway, the update query is no longer
|
|
mandatory. You can now provide solely a select query using the request
|
|
message as a source of parameters.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-jdbc-message-store-channels">
|
|
<title>JDBC Support - Channel-specific Message Store Implementation</title>
|
|
<para>
|
|
A new <emphasis>Message Channel</emphasis>-specific Message Store
|
|
Implementation has been added, providing a more scalable solution
|
|
using database-specific SQL queries. For more information please
|
|
see: <xref linkend="jdbc-message-store-channels"/>.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-shutdown">
|
|
<title>Orderly Shutdown</title>
|
|
<para>
|
|
A method <classname>stopActiveComponents()</classname> has been
|
|
added to the IntegrationMBeanExporter. This allows a Spring Integration
|
|
application to be shut down in an orderly manner, disallowing new inbound
|
|
messages to certain adapters and waiting for some time to allow in-flight
|
|
messages to complete.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-jms-og">
|
|
<title>JMS Oubound Gateway Improvements</title>
|
|
<para>
|
|
The JMS Outbound Gateway can now be configured to use a
|
|
<interfacename>MessageListener</interfacename> container to receive
|
|
replies. This can improve performance of the gateway.
|
|
</para>
|
|
</section>
|
|
<section id="2.2-o-t-j-t">
|
|
<title>object-to-json-transformer</title>
|
|
<para>
|
|
The <classname>ObjectToJsonTransformer</classname> now sets the
|
|
<emphasis>content-type</emphasis> header to <emphasis>application/json</emphasis>
|
|
by default. For more information see <xref linkend="transformer"/>.
|
|
</para>
|
|
</section>
|
|
<section id="httpChanges">
|
|
<title>HTTP Support</title>
|
|
<para>
|
|
Java serialization over HTTP is no longer enabled by default. Previously, when
|
|
setting a <code>expected-response-type</code> to a <code>Serializable</code>
|
|
object, the <code>Accept</code> header was not properly set up. The
|
|
<classname>SerializingHttpMessageConverter</classname> has now been updated
|
|
to set the Accept header to <code>application/x-java-serialized-object</code>.
|
|
However, because this could cause incompatibility with existing applications,
|
|
it was decided to no longer automatically add this converter to the HTTP endpoints.
|
|
</para>
|
|
<para>
|
|
If you wish to use Java serialization, you will need to add the
|
|
<classname>SerializingHttpMessageConverter</classname> to the appropriate
|
|
endpoints, using the <code>message-converters</code> attribute, when using
|
|
XML configuration, or using the <code>setMessageConverters()</code> method.
|
|
</para>
|
|
<para>
|
|
Alternatively, you may wish to consider using JSON instead which is enabled
|
|
by simply having <code>Jackson</code> on the classpath.
|
|
</para>
|
|
</section>
|
|
</section>
|
|
</section>
|