INT-3581: Support selector-expression on WireTap

JIRA: https://jira.spring.io/browse/INT-3581

Move schemas to 4.2.

Add `selector-expression` to `<wire-tap/>`.

INT-3781: Fix What's New

Bump Namespace Version to 4.2
This commit is contained in:
Gary Russell
2015-01-08 14:45:59 +02:00
parent 6b7bbdc326
commit 15eb01169d
68 changed files with 508 additions and 424 deletions

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/amqp/spring-integration-amqp-4.1.xsd=org/springframework/integration/amqp/config/spring-integration-amqp-4.1.xsd
http\://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd=org/springframework/integration/amqp/config/spring-integration-amqp-4.1.xsd
http\://www.springframework.org/schema/integration/amqp/spring-integration-amqp-4.2.xsd=org/springframework/integration/amqp/config/spring-integration-amqp-4.2.xsd
http\://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd=org/springframework/integration/amqp/config/spring-integration-amqp-4.2.xsd

View File

@@ -9,7 +9,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:element name="outbound-channel-adapter">
<xsd:annotation>

View File

@@ -44,7 +44,7 @@ public abstract class AbstractIntegrationNamespaceHandler implements NamespaceHa
protected final Log logger = LogFactory.getLog(this.getClass());
private static final String VERSION = "4.1";
private static final String VERSION = "4.2";
private final NamespaceHandlerDelegate delegate = new NamespaceHandlerDelegate();

View File

@@ -20,16 +20,21 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.channel.interceptor.WireTap;
import org.springframework.integration.config.ExpressionFactoryBean;
import org.springframework.integration.filter.ExpressionEvaluatingSelector;
import org.springframework.util.StringUtils;
/**
* Parser for the &lt;wire-tap&gt; element.
*
* @author Mark Fisher
* @author Gary Russell
*/
public class WireTapParser implements BeanDefinitionRegisteringParser {
@Override
public String parse(Element element, ParserContext parserContext) {
Object source = parserContext.extractSource(element);
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(WireTap.class);
String targetRef = element.getAttribute("channel");
if (!StringUtils.hasText(targetRef)) {
@@ -37,9 +42,21 @@ public class WireTapParser implements BeanDefinitionRegisteringParser {
}
builder.addConstructorArgReference(targetRef);
String selectorRef = element.getAttribute("selector");
String selectorExpression = element.getAttribute("selector-expression");
if (StringUtils.hasText(selectorRef) && StringUtils.hasText(selectorExpression)) {
parserContext.getReaderContext().error("Only one of 'selector' or 'selector-expression' is allowed", source);
}
if (StringUtils.hasText(selectorRef)) {
builder.addConstructorArgReference(selectorRef);
}
else if (StringUtils.hasText(selectorExpression)) {
BeanDefinitionBuilder expressionBuilder = BeanDefinitionBuilder
.genericBeanDefinition(ExpressionFactoryBean.class);
expressionBuilder.addConstructorArgValue(selectorExpression);
BeanDefinitionBuilder eemsBuilder = BeanDefinitionBuilder.genericBeanDefinition(ExpressionEvaluatingSelector.class);
eemsBuilder.addConstructorArgValue(expressionBuilder.getBeanDefinition());
builder.addConstructorArgValue(eemsBuilder.getBeanDefinition());
}
String timeout = element.getAttribute("timeout");
if (StringUtils.hasText(timeout)) {
builder.addPropertyValue("timeout", Long.parseLong(timeout));

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/spring-integration-4.1.xsd=org/springframework/integration/config/xml/spring-integration-4.1.xsd
http\://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-4.1.xsd
http\://www.springframework.org/schema/integration/spring-integration-4.2.xsd=org/springframework/integration/config/xml/spring-integration-4.2.xsd
http\://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-4.2.xsd

View File

@@ -3749,7 +3749,15 @@
<xsd:documentation>
A reference to a bean in the Application Context
which implements MessageSelector that must accept a message for it to be
sent to the intercepting channel
sent to the intercepting channel. Mutually exclusive with 'selector-expression'.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="selector-expression" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
A boolean expression evaluated against the message to determine whether it should
sent to the intercepting channel. Mutually exclusive with 'selector'.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>

View File

@@ -21,7 +21,7 @@
<channel id="withId">
<queue capacity="10"/>
<interceptors>
<wire-tap id="wireTap" channel="wireTapChannel"/>
<wire-tap id="wireTap" channel="wireTapChannel" selector-expression="@booleanTrue" />
</interceptors>
</channel>
@@ -54,4 +54,8 @@
<beans:constructor-arg value="false"/>
</beans:bean>
<beans:bean id="booleanTrue" class="java.lang.Boolean">
<beans:constructor-arg value="true" />
</beans:bean>
</beans:beans>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,58 +16,84 @@
package org.springframework.integration.config;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import java.util.Map;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.integration.channel.interceptor.WireTap;
import org.springframework.integration.filter.ExpressionEvaluatingSelector;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.integration.channel.interceptor.WireTap;
import org.springframework.messaging.PollableChannel;
import org.springframework.messaging.support.GenericMessage;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Mark Fisher
* @author Gary Russell
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
public class WireTapParserTests {
@Autowired
MessageChannel noSelectors;
@Autowired
MessageChannel accepting;
@Autowired
MessageChannel rejecting;
@Autowired
MessageChannel withId;
@Autowired
PollableChannel wireTapChannel;
@Autowired @Qualifier("wireTap")
WireTap wireTap;
@Autowired
List<WireTap> wireTaps;
@Test
public void simpleWireTap() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"wireTapParserTests.xml", this.getClass());
MessageChannel mainChannel = (MessageChannel) context.getBean("noSelectors");
PollableChannel wireTapChannel = (PollableChannel) context.getBean("wireTapChannel");
assertNull(wireTapChannel.receive(0));
Message<?> original = new GenericMessage<String>("test");
mainChannel.send(original);
noSelectors.send(original);
Message<?> intercepted = wireTapChannel.receive(0);
assertNotNull(intercepted);
assertEquals(original, intercepted);
}
@Test
public void simpleWireTapWithId() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"wireTapParserTests.xml", this.getClass());
WireTap wireTap = (WireTap) context.getBean("wireTap");
assertNotNull(wireTap);
public void simpleWireTapWithIdAndSelectorExpression() {
assertThat(TestUtils.getPropertyValue(wireTap, "selector"), instanceOf(ExpressionEvaluatingSelector.class));
Message<?> original = new GenericMessage<String>("test");
withId.send(original);
Message<?> intercepted = wireTapChannel.receive(0);
assertNotNull(intercepted);
assertEquals(original, intercepted);
}
@Test
public void wireTapWithAcceptingSelector() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"wireTapParserTests.xml", this.getClass());
MessageChannel mainChannel = (MessageChannel) context.getBean("accepting");
PollableChannel wireTapChannel = (PollableChannel) context.getBean("wireTapChannel");
assertNull(wireTapChannel.receive(0));
Message<?> original = new GenericMessage<String>("test");
mainChannel.send(original);
accepting.send(original);
Message<?> intercepted = wireTapChannel.receive(0);
assertNotNull(intercepted);
assertEquals(original, intercepted);
@@ -75,26 +101,19 @@ public class WireTapParserTests {
@Test
public void wireTapWithRejectingSelector() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"wireTapParserTests.xml", this.getClass());
MessageChannel mainChannel = (MessageChannel) context.getBean("rejecting");
PollableChannel wireTapChannel = (PollableChannel) context.getBean("wireTapChannel");
assertNull(wireTapChannel.receive(0));
Message<?> original = new GenericMessage<String>("test");
mainChannel.send(original);
rejecting.send(original);
Message<?> intercepted = wireTapChannel.receive(0);
assertNull(intercepted);
}
@Test
public void wireTapTimeouts() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"wireTapParserTests.xml", this.getClass());
Map<String, WireTap> beans = context.getBeansOfType(WireTap.class);
int defaultTimeoutCount = 0;
int expectedTimeoutCount = 0;
int otherTimeoutCount = 0;
for (WireTap wireTap : beans.values()) {
for (WireTap wireTap : wireTaps) {
long timeout = ((Long) new DirectFieldAccessor(wireTap).getPropertyValue("timeout")).longValue();
if (timeout == 0) {
defaultTimeoutCount++;

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/event/spring-integration-event-4.1.xsd=org/springframework/integration/event/config/spring-integration-event-4.1.xsd
http\://www.springframework.org/schema/integration/event/spring-integration-event.xsd=org/springframework/integration/event/config/spring-integration-event-4.1.xsd
http\://www.springframework.org/schema/integration/event/spring-integration-event-4.2.xsd=org/springframework/integration/event/config/spring-integration-event-4.2.xsd
http\://www.springframework.org/schema/integration/event/spring-integration-event.xsd=org/springframework/integration/event/config/spring-integration-event-4.2.xsd

View File

@@ -8,7 +8,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/feed/spring-integration-feed-4.1.xsd=org/springframework/integration/feed/config/spring-integration-feed-4.1.xsd
http\://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd=org/springframework/integration/feed/config/spring-integration-feed-4.1.xsd
http\://www.springframework.org/schema/integration/feed/spring-integration-feed-4.2.xsd=org/springframework/integration/feed/config/spring-integration-feed-4.2.xsd
http\://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd=org/springframework/integration/feed/config/spring-integration-feed-4.2.xsd

View File

@@ -9,7 +9,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:element name="inbound-channel-adapter">
<xsd:annotation>

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/file/spring-integration-file-4.1.xsd=org/springframework/integration/file/config/spring-integration-file-4.1.xsd
http\://www.springframework.org/schema/integration/file/spring-integration-file.xsd=org/springframework/integration/file/config/spring-integration-file-4.1.xsd
http\://www.springframework.org/schema/integration/file/spring-integration-file-4.2.xsd=org/springframework/integration/file/config/spring-integration-file-4.2.xsd
http\://www.springframework.org/schema/integration/file/spring-integration-file.xsd=org/springframework/integration/file/config/spring-integration-file-4.2.xsd

View File

@@ -10,7 +10,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/ftp/spring-integration-ftp-4.1.xsd=org/springframework/integration/ftp/config/spring-integration-ftp-4.1.xsd
http\://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd=org/springframework/integration/ftp/config/spring-integration-ftp-4.1.xsd
http\://www.springframework.org/schema/integration/ftp/spring-integration-ftp-4.2.xsd=org/springframework/integration/ftp/config/spring-integration-ftp-4.2.xsd
http\://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd=org/springframework/integration/ftp/config/spring-integration-ftp-4.2.xsd

View File

@@ -10,9 +10,9 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:import namespace="http://www.springframework.org/schema/integration/file"
schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.2.xsd" />
<xsd:element name="outbound-channel-adapter">
<xsd:annotation>

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire-4.1.xsd=org/springframework/integration/gemfire/config/xml/spring-integration-gemfire-4.1.xsd
http\://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd=org/springframework/integration/gemfire/config/xml/spring-integration-gemfire-4.1.xsd
http\://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire-4.2.xsd=org/springframework/integration/gemfire/config/xml/spring-integration-gemfire-4.2.xsd
http\://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd=org/springframework/integration/gemfire/config/xml/spring-integration-gemfire-4.2.xsd

View File

@@ -10,7 +10,7 @@
schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[
Defines the core configuration elements for Spring Integration GemFire Support.

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/groovy/spring-integration-groovy-4.1.xsd=org/springframework/integration/groovy/config/spring-integration-groovy-4.1.xsd
http\://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd=org/springframework/integration/groovy/config/spring-integration-groovy-4.1.xsd
http\://www.springframework.org/schema/integration/groovy/spring-integration-groovy-4.2.xsd=org/springframework/integration/groovy/config/spring-integration-groovy-4.2.xsd
http\://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd=org/springframework/integration/groovy/config/spring-integration-groovy-4.2.xsd

View File

@@ -7,11 +7,11 @@
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:include
schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.1.xsd"
schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.2.xsd"
/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:element name="script" type="GroovyScript">
<xsd:annotation>

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/http/spring-integration-http-4.1.xsd=org/springframework/integration/http/config/spring-integration-http-4.1.xsd
http\://www.springframework.org/schema/integration/http/spring-integration-http.xsd=org/springframework/integration/http/config/spring-integration-http-4.1.xsd
http\://www.springframework.org/schema/integration/http/spring-integration-http-4.2.xsd=org/springframework/integration/http/config/spring-integration-http-4.2.xsd
http\://www.springframework.org/schema/integration/http/spring-integration-http.xsd=org/springframework/integration/http/config/spring-integration-http-4.2.xsd

View File

@@ -8,7 +8,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/ip/spring-integration-ip-4.1.xsd=org/springframework/integration/ip/config/spring-integration-ip-4.1.xsd
http\://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd=org/springframework/integration/ip/config/spring-integration-ip-4.1.xsd
http\://www.springframework.org/schema/integration/ip/spring-integration-ip-4.2.xsd=org/springframework/integration/ip/config/spring-integration-ip-4.2.xsd
http\://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd=org/springframework/integration/ip/config/spring-integration-ip-4.2.xsd

View File

@@ -9,7 +9,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc-4.1.xsd=org/springframework/integration/jdbc/config/spring-integration-jdbc-4.1.xsd
http\://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd=org/springframework/integration/jdbc/config/spring-integration-jdbc-4.1.xsd
http\://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc-4.2.xsd=org/springframework/integration/jdbc/config/spring-integration-jdbc-4.2.xsd
http\://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd=org/springframework/integration/jdbc/config/spring-integration-jdbc-4.2.xsd

View File

@@ -7,7 +7,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/jms/spring-integration-jms-4.1.xsd=org/springframework/integration/jms/config/spring-integration-jms-4.1.xsd
http\://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd=org/springframework/integration/jms/config/spring-integration-jms-4.1.xsd
http\://www.springframework.org/schema/integration/jms/spring-integration-jms-4.2.xsd=org/springframework/integration/jms/config/spring-integration-jms-4.2.xsd
http\://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd=org/springframework/integration/jms/config/spring-integration-jms-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/jmx/spring-integration-jmx-4.1.xsd=org/springframework/integration/jmx/config/spring-integration-jmx-4.1.xsd
http\://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd=org/springframework/integration/jmx/config/spring-integration-jmx-4.1.xsd
http\://www.springframework.org/schema/integration/jmx/spring-integration-jmx-4.2.xsd=org/springframework/integration/jmx/config/spring-integration-jmx-4.2.xsd
http\://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd=org/springframework/integration/jmx/config/spring-integration-jmx-4.2.xsd

View File

@@ -7,7 +7,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/jpa/spring-integration-jpa-4.1.xsd=org/springframework/integration/jpa/config/xml/spring-integration-jpa-4.1.xsd
http\://www.springframework.org/schema/integration/jpa/spring-integration-jpa.xsd=org/springframework/integration/jpa/config/xml/spring-integration-jpa-4.1.xsd
http\://www.springframework.org/schema/integration/jpa/spring-integration-jpa-4.2.xsd=org/springframework/integration/jpa/config/xml/spring-integration-jpa-4.2.xsd
http\://www.springframework.org/schema/integration/jpa/spring-integration-jpa.xsd=org/springframework/integration/jpa/config/xml/spring-integration-jpa-4.2.xsd

View File

@@ -9,7 +9,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/mail/spring-integration-mail-4.1.xsd=org/springframework/integration/mail/config/spring-integration-mail-4.1.xsd
http\://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd=org/springframework/integration/mail/config/spring-integration-mail-4.1.xsd
http\://www.springframework.org/schema/integration/mail/spring-integration-mail-4.2.xsd=org/springframework/integration/mail/config/spring-integration-mail-4.2.xsd
http\://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd=org/springframework/integration/mail/config/spring-integration-mail-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb-4.1.xsd=org/springframework/integration/mongodb/config/spring-integration-mongodb-4.1.xsd
http\://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb.xsd=org/springframework/integration/mongodb/config/spring-integration-mongodb-4.1.xsd
http\://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb-4.2.xsd=org/springframework/integration/mongodb/config/spring-integration-mongodb-4.2.xsd
http\://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb.xsd=org/springframework/integration/mongodb/config/spring-integration-mongodb-4.2.xsd

View File

@@ -8,7 +8,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt-4.1.xsd=org/springframework/integration/mqtt/config/xml/spring-integration-mqtt-4.1.xsd
http\://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt.xsd=org/springframework/integration/mqtt/config/xml/spring-integration-mqtt-4.1.xsd
http\://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt-4.2.xsd=org/springframework/integration/mqtt/config/xml/spring-integration-mqtt-4.2.xsd
http\://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt.xsd=org/springframework/integration/mqtt/config/xml/spring-integration-mqtt-4.2.xsd

View File

@@ -9,7 +9,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/redis/spring-integration-redis-4.1.xsd=org/springframework/integration/redis/config/spring-integration-redis-4.1.xsd
http\://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-4.1.xsd
http\://www.springframework.org/schema/integration/redis/spring-integration-redis-4.2.xsd=org/springframework/integration/redis/config/spring-integration-redis-4.2.xsd
http\://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-4.2.xsd

View File

@@ -8,7 +8,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/rmi/spring-integration-rmi-4.1.xsd=org/springframework/integration/rmi/config/spring-integration-rmi-4.1.xsd
http\://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd=org/springframework/integration/rmi/config/spring-integration-rmi-4.1.xsd
http\://www.springframework.org/schema/integration/rmi/spring-integration-rmi-4.2.xsd=org/springframework/integration/rmi/config/spring-integration-rmi-4.2.xsd
http\://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd=org/springframework/integration/rmi/config/spring-integration-rmi-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,4 +1,4 @@
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting-4.1.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-4.1.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-4.1.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.1.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-core-4.1.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-core-4.1.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting-4.2.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-4.2.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-4.2.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.2.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-core-4.2.xsd
http\://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core.xsd=org/springframework/integration/scripting/config/spring-integration-scripting-core-4.2.xsd

View File

@@ -5,7 +5,7 @@
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:include
schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.2.xsd" />
<xsd:element name="script">
<xsd:annotation>

View File

@@ -8,7 +8,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:complexType name="ScriptType" mixed="true" abstract="true">

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/security/spring-integration-security-4.1.xsd=org/springframework/integration/security/config/spring-integration-security-4.1.xsd
http\://www.springframework.org/schema/integration/security/spring-integration-security.xsd=org/springframework/integration/security/config/spring-integration-security-4.1.xsd
http\://www.springframework.org/schema/integration/security/spring-integration-security-4.2.xsd=org/springframework/integration/security/config/spring-integration-security-4.2.xsd
http\://www.springframework.org/schema/integration/security/spring-integration-security.xsd=org/springframework/integration/security/config/spring-integration-security-4.2.xsd

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/sftp/spring-integration-sftp-4.1.xsd=org/springframework/integration/sftp/config/spring-integration-sftp-4.1.xsd
http\://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd=org/springframework/integration/sftp/config/spring-integration-sftp-4.1.xsd
http\://www.springframework.org/schema/integration/sftp/spring-integration-sftp-4.2.xsd=org/springframework/integration/sftp/config/spring-integration-sftp-4.2.xsd
http\://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd=org/springframework/integration/sftp/config/spring-integration-sftp-4.2.xsd

View File

@@ -10,9 +10,9 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:import namespace="http://www.springframework.org/schema/integration/file"
schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.2.xsd" />
<xsd:element name="outbound-channel-adapter">
<xsd:annotation>

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/stream/spring-integration-stream-4.1.xsd=org/springframework/integration/stream/config/spring-integration-stream-4.1.xsd
http\://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd=org/springframework/integration/stream/config/spring-integration-stream-4.1.xsd
http\://www.springframework.org/schema/integration/stream/spring-integration-stream-4.2.xsd=org/springframework/integration/stream/config/spring-integration-stream-4.2.xsd
http\://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd=org/springframework/integration/stream/config/spring-integration-stream-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/syslog/spring-integration-syslog-4.1.xsd=org/springframework/integration/syslog/config/spring-integration-syslog-4.1.xsd
http\://www.springframework.org/schema/integration/syslog/spring-integration-syslog.xsd=org/springframework/integration/syslog/config/spring-integration-syslog-4.1.xsd
http\://www.springframework.org/schema/integration/syslog/spring-integration-syslog-4.2.xsd=org/springframework/integration/syslog/config/spring-integration-syslog-4.2.xsd
http\://www.springframework.org/schema/integration/syslog/spring-integration-syslog.xsd=org/springframework/integration/syslog/config/spring-integration-syslog-4.2.xsd

View File

@@ -10,9 +10,9 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd" />
<xsd:import namespace="http://www.springframework.org/schema/integration/ip"
schemaLocation="http://www.springframework.org/schema/integration/ip/spring-integration-ip-4.1.xsd" />
schemaLocation="http://www.springframework.org/schema/integration/ip/spring-integration-ip-4.2.xsd" />
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/twitter/spring-integration-twitter-4.1.xsd=org/springframework/integration/twitter/config/spring-integration-twitter-4.1.xsd
http\://www.springframework.org/schema/integration/twitter/spring-integration-twitter.xsd=org/springframework/integration/twitter/config/spring-integration-twitter-4.1.xsd
http\://www.springframework.org/schema/integration/twitter/spring-integration-twitter-4.2.xsd=org/springframework/integration/twitter/config/spring-integration-twitter-4.2.xsd
http\://www.springframework.org/schema/integration/twitter/spring-integration-twitter.xsd=org/springframework/integration/twitter/config/spring-integration-twitter-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<!--
INBOUND

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/websocket/spring-integration-websocket-4.1.xsd=org/springframework/integration/websocket/config/spring-integration-websocket-4.1.xsd
http\://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd=org/springframework/integration/websocket/config/spring-integration-websocket-4.1.xsd
http\://www.springframework.org/schema/integration/websocket/spring-integration-websocket-4.2.xsd=org/springframework/integration/websocket/config/spring-integration-websocket-4.2.xsd
http\://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd=org/springframework/integration/websocket/config/spring-integration-websocket-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/ws/spring-integration-ws-4.1.xsd=org/springframework/integration/ws/config/spring-integration-ws-4.1.xsd
http\://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd=org/springframework/integration/ws/config/spring-integration-ws-4.1.xsd
http\://www.springframework.org/schema/integration/ws/spring-integration-ws-4.2.xsd=org/springframework/integration/ws/config/spring-integration-ws-4.2.xsd
http\://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd=org/springframework/integration/ws/config/spring-integration-ws-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation><![CDATA[

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/xml/spring-integration-xml-4.1.xsd=org/springframework/integration/xml/config/spring-integration-xml-4.1.xsd
http\://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd=org/springframework/integration/xml/config/spring-integration-xml-4.1.xsd
http\://www.springframework.org/schema/integration/xml/spring-integration-xml-4.2.xsd=org/springframework/integration/xml/config/spring-integration-xml-4.2.xsd
http\://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd=org/springframework/integration/xml/config/spring-integration-xml-4.2.xsd

View File

@@ -10,7 +10,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans" />
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:annotation>
<xsd:documentation>

View File

@@ -1,2 +1,2 @@
http\://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp-4.1.xsd=org/springframework/integration/xmpp/config/spring-integration-xmpp-4.1.xsd
http\://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd=org/springframework/integration/xmpp/config/spring-integration-xmpp-4.1.xsd
http\://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp-4.2.xsd=org/springframework/integration/xmpp/config/spring-integration-xmpp-4.2.xsd
http\://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd=org/springframework/integration/xmpp/config/spring-integration-xmpp-4.2.xsd

View File

@@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>
<xsd:import namespace="http://www.springframework.org/schema/integration"
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.1.xsd"/>
schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.2.xsd"/>
<xsd:element name="xmpp-connection">
<xsd:annotation>

View File

@@ -2,8 +2,311 @@
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="migration-4.0-4.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Changes between 4.0 and 4.1</title>
<para>
For an overview of the changes in Spring Integration 4.1 since version 4.0,
please see <xref linkend="whats-new"/>.
</para>
<para>
Please be sure to also see the
<ulink url="https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.0-to-4.1-Migration-Guide"
>Migration Guide</ulink> for important changes that might affect your applications.
Migration guides for all versions back to <emphasis>2.1</emphasis> can be found on the
<ulink url="https://github.com/spring-projects/spring-integration/wiki">Wiki</ulink>.
</para>
<section>
<title>New Components</title>
<section id="4.1-promise-gateway">
<title>Promise&lt;?&gt; Gateway</title>
<para>
A Reactor <classname>Promise</classname> return type is now supported for Messaging Gateway methods.
See <xref linkend="async-gateway"/>.
</para>
</section>
<section id="4.1-web-socket-adapters">
<title>WebSocket support</title>
<para>
The <emphasis>WebSocket</emphasis> module is now available. It is fully based on the Spring WebSocket
and Spring Messaging modules and provides an <code>&lt;inbound-channel-adapter&gt;</code> and an
<code>&lt;outbound-channel-adapter&gt;</code>.
See <xref linkend="web-sockets"/> for more information.
</para>
</section>
<section id="4.1-scatter-gather">
<title>Scatter-Gather EIP pattern</title>
<para>
The <emphasis>Scatter-Gather</emphasis> EIP pattern is now implemented.
See <xref linkend="scatter-gather"/> for more information.
</para>
</section>
<section id="4.1-Routing-Slip">
<title>Routing Slip Pattern</title>
<para>
The <emphasis>Routing Slip</emphasis> EIP pattern implementation is now provided.
See <xref linkend="routing-slip"/> for more information.
</para>
</section>
<section id="4.1-idempotent-receiver">
<title>Idempotent Receiver Pattern</title>
<para>
The <emphasis>Idempotent Receiver</emphasis> EIP implementation is now provided
via the <code>&lt;idempotent-receiver&gt;</code> component in XML, or the
<classname>IdempotentReceiverInterceptor</classname> and
<interfacename>IdempotentReceiver</interfacename> annotation when using Java
Configuration.
See <xref linkend="idempotent-receiver"/> and their JavaDocs for more information.
</para>
</section>
<section id="4.1-BoonJsonObjectMapper">
<title>BoonJsonObjectMapper</title>
<para>
The <emphasis>Boon</emphasis> <interfacename>JsonObjectMapper</interfacename> is now provided
for the JSON transformers. See <xref linkend="transformer"/> for more information.
</para>
</section>
<section id="4.1-redis-queue-gateways">
<title>Redis Queue Gateways</title>
<para>
The <code>&lt;redis-queue-inbound-gateway&gt;</code> and
<code>&lt;redis-queue-outbound-gateway&gt;</code> components are now provided.
See <xref linkend="redis-queue-inbound-gateway"/> and <xref linkend="redis-queue-outbound-gateway"/>.
</para>
</section>
<section id="4.1-PollSkipAdvice">
<title>PollSkipAdvice</title>
<para>
The <classname>PollSkipAdvice</classname> is now provided to be used within
<code>&lt;advice-chain&gt;</code> of the <code>&lt;poller&gt;</code> to determine if the current
<emphasis>poll</emphasis> should be suppressed (skipped) by some condition implemented with
<interfacename>PollSkipStrategy</interfacename>.
See <xref linkend="polling-consumer"/> for more information.
</para>
</section>
</section>
<section id="4.1-general">
<title>General Changes</title>
<section id="4.1-amqp-inbound-missing-queues">
<title>AMQP Inbound Endpoints, Channel</title>
<para>
Elements that utilize a message listener container (inbound endpoints, channel)
now support the <code>missing-queues-fatal</code> attribute.
See <xref linkend="amqp"/> for more information.
</para>
</section>
<section id="4.1-amqp-outbound-lazy-connect">
<title>AMQP Outbound Endpoints</title>
<para>
The AMQP outbound endpoints support a new property <code>lazy-connect</code>
(default true). When true, the connection to the broker is not established
until the first message arrives (assuming there are no inbound endpoints, which
always attempt to establish the connection during startup). When set the 'false' an
attempt to establish the connection is made during application startup.
See <xref linkend="amqp"/> for more information.
</para>
</section>
<section id="4.1-sms-copy-on-get">
<title>SimpleMessageStore</title>
<para>
The <classname>SimpleMessageStore</classname> no longer makes a copy of the group
when calling <code>getMessageGroup()</code>.
See <xref linkend="sms-caution"/> for more information.
</para>
</section>
<section id="4.1-ws-encode-uri">
<title>Web Service Outbound Gateway: encode-uri</title>
<para>
The <code>&lt;ws:outbound-gateway/&gt;</code> now
provides an <code>encode-uri</code> attribute to allow disabling the encoding of the URI object
before sending the request.
</para>
</section>
<section id="4.1-http-status-code">
<title>Http Inbound Channel Adapter and StatusCode</title>
<para>
The <code>&lt;http:inbound-channel-adapter&gt;</code> can now be configured with a
<code>status-code-expression</code> to override the default <code>200 OK</code> status.
See <xref linkend="http-namespace"/> for more information.
</para>
</section>
<section id="4.1-mqtt">
<title>MQTT Adapter Changes</title>
<para>
The MQTT channel adapters can now be configured to connect to multiple servers,
for example, to support High Availability (HA).
See <xref linkend="mqtt"/> for more information.
</para>
<para>
The MQTT message-driven channel adapter now supports specifying the QoS setting for each
subscription. See <xref linkend="mqtt-inbound"/> for more information.
</para>
<para>
The MQTT outbound channel adapter now supports asynchronous sends, avoiding blocking
until delivery is confirmed. See <xref linkend="mqtt-outbound"/> for more information.
</para>
<para>
It is now possible to programmatically subscribe to and unsubscribe from topics at runtime.
See <xref linkend="mqtt-inbound"/> for more information.
</para>
</section>
<section id="4.1-sftp">
<title>FTP/SFTP Adapter Changes</title>
<para>
The FTP and SFTP outbound channel adapters now support appending to remote files, as
well as taking specific actions when a remote file already exists. The remote file
templates now also support this as well as <code>rmdir()</code> and <code>exists()</code>.
In addition, the remote file templates provide access to the underlying client object
enabling access to low-level APIs.
</para>
<para>
See <xref linkend="ftp"/> and <xref linkend="sftp"/> for more information.
</para>
</section>
<section id="4.1-splitter-iterator">
<title>Splitter and Iterator</title>
<para>
<code>Splitter</code> components now support an <classname>Iterator</classname> as the result object
for producing output messages.
See <xref linkend="splitter"/> for more information.
</para>
</section>
<section id="4.1-aggregator">
<title>Aggregator</title>
<para>
<code>Aggregator</code>s now support a new attribute <code>expire-groups-on-timeout</code>.
See <xref linkend="aggregator-config"/> for more information.
</para>
</section>
<section id="4.1-content-enricher-improvement">
<title>Content Enricher Improvements</title>
<para>
An <code>null-result-expression</code> attribute has been added, which is evaluated and returned if
<code>&lt;enricher&gt;</code> returns <code>null</code>.
It can be added in <code>&lt;header&gt;</code> and <code>&lt;property&gt;</code>.
See <xref linkend="content-enricher"/> for more information.
</para>
<para>
An <code>error-channel</code> attribute has been added, which is used to handle an error flow
if <classname>Exception</classname> occurs downstream of the <code>request-channel</code>. This enable
you to return an alternative object to use for enrichment.
See <xref linkend="content-enricher"/> for more information.
</para>
</section>
<section id="4.1-header-channel-registry">
<title>Header Channel Registry</title>
<para>
The <code>&lt;header-enricher/&gt;</code>'s <code>&lt;header-channels-to-string/&gt;</code>
element can now override the header channel registry's default time for retaining channel
mappings.
See <xref linkend="header-channel-registry"/> for more information.
</para>
</section>
<section id="4.1-orderly-shutdown">
<title>Orderly Shutdown</title>
<para>
Improvements have been made to the orderly shutdown algorithm.
See <xref linkend="jmx-shutdown"/> for more information.
</para>
</section>
<section id="4.1-recipientListRouter">
<title>Management for RecipientListRouter</title>
<para>
The <classname>RecipientListRouter</classname> provides now several <emphasis>management</emphasis>
operations to configure <emphasis>recipients</emphasis> at runtime.
With that the <code>&lt;recipient-list-router&gt;</code> can now be configured without any
<code>&lt;recipient&gt;</code> from the start.
See <xref linkend="recipient-list-router-management"/> for more information.
</para>
</section>
<section id="4.1-AbstractHeaderMapper-changes">
<title>AbstractHeaderMapper: NON_STANDARD_HEADERS token</title>
<para>
The <classname>AbstractHeaderMapper</classname> implementations now provides the additional
<code>NON_STANDARD_HEADERS</code> token to map any user-defined headers, which aren't mapped by default.
See <xref linkend="amqp-message-headers"/> for more information.
</para>
</section>
<section id="4.1-amqp-channels">
<title>AMQP Channels: template-channel-transacted</title>
<para>
The new <code>template-channel-transacted</code> attribute has been introduced for AMQP
<classname>MessageChannel</classname>s.
See <xref linkend="amqp-channels"/> for more information.
</para>
</section>
<section id="4.1-syslog">
<title>Syslog Adapter</title>
<para>
The default syslog message converter now has an option to retain the original message in
the payload, while still setting the headers.
See <xref linkend="syslog-inbound-adapter"/> for more information.
</para>
</section>
<section id="4.1-async-gateway">
<title>Async Gateway</title>
<para>
In addition to the <classname>Promise</classname> return type mentioned above,
gateway methods may now return a <classname>ListenableFuture</classname>, introduced
in Spring Framework 4.0. You can also disable the async processing in the gateway,
allowing a downstream flow to directly return a <classname>Future</classname>.
See <xref linkend="async-gateway"/>.
</para>
</section>
<section id="4.1-aggregator-advice-chain">
<title>Aggregator Advice Chain</title>
<para>
<code>Aggregator</code>s and <code>Resequencer</code>s now support an
<code>&lt;expire-advice-chain/&gt;</code> and <code>&lt;expire-transactional/&gt;</code> sub-elements
to <emphasis>advise</emphasis> the <code>forceComplete</code> operation.
See <xref linkend="aggregator-config"/> for more information.
</para>
</section>
<section id="4.1-script-outbound-channel-adapter">
<title>Outbound Channel Adapter and Scripts</title>
<para>
The <code>&lt;int:outbound-channel-adapter/&gt;</code> now supports the <code>&lt;script/&gt;</code>
sub-element. The underlying script must have a <code>void</code>
return type or return <code>null</code>.
See <xref linkend="groovy"/> and <xref linkend="scripting"/>.
</para>
</section>
<section id="4.1-reseq">
<title>Resequencer Changes</title>
<para>
When a message group in a resequencer is timed out (using <code>group-timeout</code> or a
<classname>MessageGroupStoreReaper</classname>), late arriving messages will now be discarded
immediately by default.
See <xref linkend="resequencer"/>.
</para>
</section>
<section id="4.1-Optional-Parameter">
<title>Optional POJO method parameter</title>
<para>
Now Spring Integration consistently handles the Java 8's <classname>Optional</classname> type.
See <xref linkend="service-activator-namespace"/>.
</para>
</section>
<section id="4.1-queue-channel-queue.typ">
<title>QueueChannel: backed Queue type</title>
<para>
The <classname>QueueChannel</classname> backed <classname>Queue type</classname> has been changed
from <interfacename>BlockingQueue</interfacename> to the more generic
<interfacename>Queue</interfacename>. It allows the use of any external
<interfacename>Queue</interfacename> implementation, for example Reactor's
<classname>PersistentQueue</classname>.
See <xref linkend="channel-configuration-queuechannel"/>.
</para>
</section>
<section id="4.1-channel-interceptor">
<title>ChannelInterceptor Changes</title>
<para>
The <interfacename>ChannelInterceptor</interfacename> now supports additional
<code>afterSendCompletion()</code> and <code>afterReceiveCompletion()</code> methods.
See <xref linkend="channel-interceptors"/>.
</para>
</section>
<section id="4.1-mail-peek">
<title>IMAP PEEK</title>
<para>
Since <emphasis>version 4.1.1</emphasis> there is a change of behavior if you explicitly
set the javamail property <code>mail.[protocol].peek</code> to <code>false</code>
(where <code>[protocol]</code> is <code>imap</code> or <code>imaps</code>).
See <xref linkend="imap-peek"/>.
</para>
</section>
</section>
</section>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="migration-4.1-4.2"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Changes between 4.1 and 4.2</title>
<para>
For an overview of the changes in Spring Integration 4.2 since version 4.1,
please see <xref linkend="whats-new"/>.
</para>
</section>

View File

@@ -810,7 +810,7 @@ public QueueChannel reactorQueue() {
</para>
<para>
<emphasis>A little more on Wire Tap</emphasis>
<emphasis role="bold">A little more on Wire Tap</emphasis>
</para>
<para>
One of the common misconceptions about the wire tap and other similar components (<xref linkend="message-publishing-config"/>)
@@ -880,6 +880,16 @@ public QueueChannel reactorQueue() {
techniques.
</important>
</section>
<section id="conditional-wiretap">
<title>Conditional Wire Taps</title>
<para>
Wire taps can be made conditional, using the <code>selector</code> or <code>selector-expression</code>
attributes. The <code>selector</code> references a <classname>MessageSelector</classname> bean, which
can determine at runtime whether the message should go to the tap channel. Similarly, the
<code>selector-expression</code> is a boolean SpEL expression that performs the same purpose - if
the expression evaluates to true, the message will be sent to the tap channel.
</para>
</section>
<section id="channel-global-wiretap">
<title>Global Wire Tap Configuration</title>
<para>It is possible to configure a global wire tap as a special case of the <xref linkend="global-channel-configuration-interceptors" endterm="global-channel-interceptor"/>. Simply configure a top level <code>wire-tap</code> element. Now, in addition to the normal <code>wire-tap</code> namespace support, the <code>pattern</code> and <code>order</code> attributes are supported and work in exactly the same way as with the <code>channel-interceptor</code>

View File

@@ -4,6 +4,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Change History</title>
<xi:include href="./changes-4.1-4.2.xml"/>
<xi:include href="./changes-4.0-4.1.xml"/>
<xi:include href="./changes-3.0-4.0.xml"/>
<xi:include href="./changes-2.2-3.0.xml"/>

View File

@@ -2,312 +2,25 @@
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="whats-new"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>What's new in Spring Integration 4.1?</title>
<title>What's new in Spring Integration 4.2?</title>
<para>
This chapter provides an overview of the new features and improvements
that have been introduced with Spring Integration 4.1. If you are interested
in more details, please see the Issue Tracker tickets that
were resolved as part of the 4.1 development process.
</para>
<section id="4.1-new-components">
<title>New Components</title>
<section id="4.1-promise-gateway">
<title>Promise&lt;?&gt; Gateway</title>
<para>
A Reactor <classname>Promise</classname> return type is now supported for Messaging Gateway methods.
See <xref linkend="async-gateway"/>.
</para>
</section>
<section id="4.1-web-socket-adapters">
<title>WebSocket support</title>
<para>
The <emphasis>WebSocket</emphasis> module is now available. It is fully based on the Spring WebSocket
and Spring Messaging modules and provides an <code>&lt;inbound-channel-adapter&gt;</code> and an
<code>&lt;outbound-channel-adapter&gt;</code>.
See <xref linkend="web-sockets"/> for more information.
</para>
</section>
<section id="4.1-scatter-gather">
<title>Scatter-Gather EIP pattern</title>
<para>
The <emphasis>Scatter-Gather</emphasis> EIP pattern is now implemented.
See <xref linkend="scatter-gather"/> for more information.
</para>
</section>
<section id="4.1-Routing-Slip">
<title>Routing Slip Pattern</title>
<para>
The <emphasis>Routing Slip</emphasis> EIP pattern implementation is now provided.
See <xref linkend="routing-slip"/> for more information.
</para>
</section>
<section id="4.1-idempotent-receiver">
<title>Idempotent Receiver Pattern</title>
<para>
The <emphasis>Idempotent Receiver</emphasis> EIP implementation is now provided
via the <code>&lt;idempotent-receiver&gt;</code> component in XML, or the
<classname>IdempotentReceiverInterceptor</classname> and
<interfacename>IdempotentReceiver</interfacename> annotation when using Java
Configuration.
See <xref linkend="idempotent-receiver"/> and their JavaDocs for more information.
</para>
</section>
<section id="4.1-BoonJsonObjectMapper">
<title>BoonJsonObjectMapper</title>
<para>
The <emphasis>Boon</emphasis> <interfacename>JsonObjectMapper</interfacename> is now provided
for the JSON transformers. See <xref linkend="transformer"/> for more information.
</para>
</section>
<section id="4.1-redis-queue-gateways">
<title>Redis Queue Gateways</title>
<para>
The <code>&lt;redis-queue-inbound-gateway&gt;</code> and
<code>&lt;redis-queue-outbound-gateway&gt;</code> components are now provided.
See <xref linkend="redis-queue-inbound-gateway"/> and <xref linkend="redis-queue-outbound-gateway"/>.
</para>
</section>
<section id="4.1-PollSkipAdvice">
<title>PollSkipAdvice</title>
<para>
The <classname>PollSkipAdvice</classname> is now provided to be used within
<code>&lt;advice-chain&gt;</code> of the <code>&lt;poller&gt;</code> to determine if the current
<emphasis>poll</emphasis> should be suppressed (skipped) by some condition implemented with
<interfacename>PollSkipStrategy</interfacename>.
See <xref linkend="polling-consumer"/> for more information.
</para>
</section>
<section id="4.2-new-components">
<title>New Components</title>
</section>
<section id="4.1-general">
<section id="4.2-general">
<title>General Changes</title>
<section id="4.1-amqp-inbound-missing-queues">
<title>AMQP Inbound Endpoints, Channel</title>
<section id="4.2-wire-tap">
<title>Wire Tap</title>
<para>
Elements that utilize a message listener container (inbound endpoints, channel)
now support the <code>missing-queues-fatal</code> attribute.
See <xref linkend="amqp"/> for more information.
As an alternative to the existing <code>selector</code> attribute, the
<code>&lt;wire-tap/&gt;</code> now supports the <code>selector-expression</code>
attribute.
</para>
</section>
<section id="4.1-amqp-outbound-lazy-connect">
<title>AMQP Outbound Endpoints</title>
<para>
The AMQP outbound endpoints support a new property <code>lazy-connect</code>
(default true). When true, the connection to the broker is not established
until the first message arrives (assuming there are no inbound endpoints, which
always attempt to establish the connection during startup). When set the 'false' an
attempt to establish the connection is made during application startup.
See <xref linkend="amqp"/> for more information.
</para>
</section>
<section id="4.1-sms-copy-on-get">
<title>SimpleMessageStore</title>
<para>
The <classname>SimpleMessageStore</classname> no longer makes a copy of the group
when calling <code>getMessageGroup()</code>.
See <xref linkend="sms-caution"/> for more information.
</para>
</section>
<section id="4.1-ws-encode-uri">
<title>Web Service Outbound Gateway: encode-uri</title>
<para>
The <code>&lt;ws:outbound-gateway/&gt;</code> now
provides an <code>encode-uri</code> attribute to allow disabling the encoding of the URI object
before sending the request.
</para>
</section>
<section id="4.1-http-status-code">
<title>Http Inbound Channel Adapter and StatusCode</title>
<para>
The <code>&lt;http:inbound-channel-adapter&gt;</code> can now be configured with a
<code>status-code-expression</code> to override the default <code>200 OK</code> status.
See <xref linkend="http-namespace"/> for more information.
</para>
</section>
<section id="4.1-mqtt">
<title>MQTT Adapter Changes</title>
<para>
The MQTT channel adapters can now be configured to connect to multiple servers,
for example, to support High Availability (HA).
See <xref linkend="mqtt"/> for more information.
</para>
<para>
The MQTT message-driven channel adapter now supports specifying the QoS setting for each
subscription. See <xref linkend="mqtt-inbound"/> for more information.
</para>
<para>
The MQTT outbound channel adapter now supports asynchronous sends, avoiding blocking
until delivery is confirmed. See <xref linkend="mqtt-outbound"/> for more information.
</para>
<para>
It is now possible to programmatically subscribe to and unsubscribe from topics at runtime.
See <xref linkend="mqtt-inbound"/> for more information.
</para>
</section>
<section id="4.1-sftp">
<title>FTP/SFTP Adapter Changes</title>
<para>
The FTP and SFTP outbound channel adapters now support appending to remote files, as
well as taking specific actions when a remote file already exists. The remote file
templates now also support this as well as <code>rmdir()</code> and <code>exists()</code>.
In addition, the remote file templates provide access to the underlying client object
enabling access to low-level APIs.
</para>
<para>
See <xref linkend="ftp"/> and <xref linkend="sftp"/> for more information.
</para>
</section>
<section id="4.1-splitter-iterator">
<title>Splitter and Iterator</title>
<para>
<code>Splitter</code> components now support an <classname>Iterator</classname> as the result object
for producing output messages.
See <xref linkend="splitter"/> for more information.
</para>
</section>
<section id="4.1-aggregator">
<title>Aggregator</title>
<para>
<code>Aggregator</code>s now support a new attribute <code>expire-groups-on-timeout</code>.
See <xref linkend="aggregator-config"/> for more information.
</para>
</section>
<section id="4.1-content-enricher-improvement">
<title>Content Enricher Improvements</title>
<para>
An <code>null-result-expression</code> attribute has been added, which is evaluated and returned if
<code>&lt;enricher&gt;</code> returns <code>null</code>.
It can be added in <code>&lt;header&gt;</code> and <code>&lt;property&gt;</code>.
See <xref linkend="content-enricher"/> for more information.
</para>
<para>
An <code>error-channel</code> attribute has been added, which is used to handle an error flow
if <classname>Exception</classname> occurs downstream of the <code>request-channel</code>. This enable
you to return an alternative object to use for enrichment.
See <xref linkend="content-enricher"/> for more information.
</para>
</section>
<section id="4.1-header-channel-registry">
<title>Header Channel Registry</title>
<para>
The <code>&lt;header-enricher/&gt;</code>'s <code>&lt;header-channels-to-string/&gt;</code>
element can now override the header channel registry's default time for retaining channel
mappings.
See <xref linkend="header-channel-registry"/> for more information.
</para>
</section>
<section id="4.1-orderly-shutdown">
<title>Orderly Shutdown</title>
<para>
Improvements have been made to the orderly shutdown algorithm.
See <xref linkend="jmx-shutdown"/> for more information.
</para>
</section>
<section id="4.1-recipientListRouter">
<title>Management for RecipientListRouter</title>
<para>
The <classname>RecipientListRouter</classname> provides now several <emphasis>management</emphasis>
operations to configure <emphasis>recipients</emphasis> at runtime.
With that the <code>&lt;recipient-list-router&gt;</code> can now be configured without any
<code>&lt;recipient&gt;</code> from the start.
See <xref linkend="recipient-list-router-management"/> for more information.
</para>
</section>
<section id="4.1-AbstractHeaderMapper-changes">
<title>AbstractHeaderMapper: NON_STANDARD_HEADERS token</title>
<para>
The <classname>AbstractHeaderMapper</classname> implementations now provides the additional
<code>NON_STANDARD_HEADERS</code> token to map any user-defined headers, which aren't mapped by default.
See <xref linkend="amqp-message-headers"/> for more information.
</para>
</section>
<section id="4.1-amqp-channels">
<title>AMQP Channels: template-channel-transacted</title>
<para>
The new <code>template-channel-transacted</code> attribute has been introduced for AMQP
<classname>MessageChannel</classname>s.
See <xref linkend="amqp-channels"/> for more information.
</para>
</section>
<section id="4.1-syslog">
<title>Syslog Adapter</title>
<para>
The default syslog message converter now has an option to retain the original message in
the payload, while still setting the headers.
See <xref linkend="syslog-inbound-adapter"/> for more information.
</para>
</section>
<section id="4.1-async-gateway">
<title>Async Gateway</title>
<para>
In addition to the <classname>Promise</classname> return type mentioned above,
gateway methods may now return a <classname>ListenableFuture</classname>, introduced
in Spring Framework 4.0. You can also disable the async processing in the gateway,
allowing a downstream flow to directly return a <classname>Future</classname>.
See <xref linkend="async-gateway"/>.
</para>
</section>
<section id="4.1-aggregator-advice-chain">
<title>Aggregator Advice Chain</title>
<para>
<code>Aggregator</code>s and <code>Resequencer</code>s now support an
<code>&lt;expire-advice-chain/&gt;</code> and <code>&lt;expire-transactional/&gt;</code> sub-elements
to <emphasis>advise</emphasis> the <code>forceComplete</code> operation.
See <xref linkend="aggregator-config"/> for more information.
</para>
</section>
<section id="4.1-script-outbound-channel-adapter">
<title>Outbound Channel Adapter and Scripts</title>
<para>
The <code>&lt;int:outbound-channel-adapter/&gt;</code> now supports the <code>&lt;script/&gt;</code>
sub-element. The underlying script must have a <code>void</code>
return type or return <code>null</code>.
See <xref linkend="groovy"/> and <xref linkend="scripting"/>.
</para>
</section>
<section id="4.1-reseq">
<title>Resequencer Changes</title>
<para>
When a message group in a resequencer is timed out (using <code>group-timeout</code> or a
<classname>MessageGroupStoreReaper</classname>), late arriving messages will now be discarded
immediately by default.
See <xref linkend="resequencer"/>.
</para>
</section>
<section id="4.1-Optional-Parameter">
<title>Optional POJO method parameter</title>
<para>
Now Spring Integration consistently handles the Java 8's <classname>Optional</classname> type.
See <xref linkend="service-activator-namespace"/>.
</para>
</section>
<section id="4.1-queue-channel-queue.typ">
<title>QueueChannel: backed Queue type</title>
<para>
The <classname>QueueChannel</classname> backed <classname>Queue type</classname> has been changed
from <interfacename>BlockingQueue</interfacename> to the more generic
<interfacename>Queue</interfacename>. It allows the use of any external
<interfacename>Queue</interfacename> implementation, for example Reactor's
<classname>PersistentQueue</classname>.
See <xref linkend="channel-configuration-queuechannel"/>.
</para>
</section>
<section id="4.1-channel-interceptor">
<title>ChannelInterceptor Changes</title>
<para>
The <interfacename>ChannelInterceptor</interfacename> now supports additional
<code>afterSendCompletion()</code> and <code>afterReceiveCompletion()</code> methods.
See <xref linkend="channel-interceptors"/>.
</para>
</section>
<section id="4.1-mail-peek">
<title>IMAP PEEK</title>
<para>
Since <emphasis>version 4.1.1</emphasis> there is a change of behavior if you explicitly
set the javamail property <code>mail.[protocol].peek</code> to <code>false</code>
(where <code>[protocol]</code> is <code>imap</code> or <code>imaps</code>).
See <xref linkend="imap-peek"/>.
</para>
</section>
</section>
</chapter>