INTSAMPLES-89 - Upgrade to Spring Integration 2.2 RC3

* Test samples
* Polish documentation
* Polish code

For reference see: https://jira.springsource.org/browse/INTSAMPLES-89
This commit is contained in:
Gunnar Hillert
2012-10-28 22:51:14 -04:00
parent 251e035a18
commit 3c9c91c847
93 changed files with 1666 additions and 1454 deletions

View File

@@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.integration.samples</groupId>
<artifactId>advanced-testing-examples</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
<version>2.2.0.BUILD-SNAPSHOT</version>
<name>Samples (Advanced) - Advanced Testing Examples</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.integration.version>2.1.0.RELEASE</spring.integration.version>
<spring.version>3.1.0.RELEASE</spring.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.integration.version>2.2.0.RC3</spring.integration.version>
<spring.version>3.1.3.RELEASE</spring.version>
<log4j.version>1.2.16</log4j.version>
<junit.version>4.10</junit.version>
</properties>

View File

@@ -2,14 +2,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.integration.samples</groupId>
<artifactId>dynamic-ftp</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
<version>2.2.0.BUILD-SNAPSHOT</version>
<name>Samples (Advanced) - Dynamic FTP Demo</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.framework.version>3.1.0.RELEASE</spring.framework.version>
<spring.integration.version>2.2.0.M1</spring.integration.version>
<log4j.version>1.2.16</log4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.framework.version>3.1.3.RELEASE</spring.framework.version>
<spring.integration.version>2.2.0.RC3</spring.integration.version>
<log4j.version>1.2.17</log4j.version>
<junit.version>4.10</junit.version>
</properties>
<dependencies>
@@ -54,17 +54,18 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>false</showDeprecation>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<includes>
<include>**/*Tests.java</include>

View File

@@ -26,7 +26,6 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.MessageHandlingException;
import org.springframework.integration.MessagingException;
import org.springframework.integration.support.MessageBuilder;
@@ -50,14 +49,14 @@ public class FtpOutboundChannelAdapterSample {
channel.send(message);
} catch (MessagingException e) {
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
assertEquals("host.for.cust1", e.getCause().getCause().getMessage());
assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust1"));
}
// send another so we can see in the log we don't create the ac again.
try {
channel.send(message);
} catch (MessagingException e) {
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
assertEquals("host.for.cust1", e.getCause().getCause().getMessage());
assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust1"));
}
// send to a different customer; again, check the log to see a new ac is built
message = MessageBuilder.withPayload(file)
@@ -66,10 +65,10 @@ public class FtpOutboundChannelAdapterSample {
channel.send(message);
} catch (MessagingException e) {
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
assertEquals("host.for.cust2", e.getCause().getCause().getMessage());
assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust2"));
}
// send to a different customer; again, check the log to see a new ac is built
// send to a different customer; again, check the log to see a new ac is built
//and the first one created (cust1) should be closed and removed as per the max cache size restriction
message = MessageBuilder.withPayload(file)
.setHeader("customer", "cust3").build();
@@ -77,10 +76,10 @@ public class FtpOutboundChannelAdapterSample {
channel.send(message);
} catch (MessagingException e) {
assertTrue(e.getCause().getCause() instanceof UnknownHostException);
assertEquals("host.for.cust3", e.getCause().getCause().getMessage());
assertTrue(e.getCause().getCause().getMessage().startsWith("host.for.cust3"));
}
//send to cust1 again, since this one has been invalidated before, we should
//send to cust1 again, since this one has been invalidated before, we should
//see a new ac created (with ac of cust2 destroyed and removed)
message = MessageBuilder.withPayload(file)
.setHeader("customer", "cust1").build();

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.integration.samples</groupId>
<artifactId>advanced-samples</artifactId>
<version>2.1.0.RELEASE</version>
<version>2.2.0.BUILD-SNAPSHOT</version>
<name>Spring Integration Samples - Advanced</name>
<packaging>pom</packaging>