From 3c9c91c84763e884cb6fd5f76e8fc7e4afc08ec1 Mon Sep 17 00:00:00 2001 From: Gunnar Hillert Date: Sun, 28 Oct 2012 22:51:14 -0400 Subject: [PATCH] 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 --- README.md | 56 ++-- advanced/advanced-testing-examples/pom.xml | 8 +- advanced/dynamic-ftp/pom.xml | 19 +- .../ftp/FtpOutboundChannelAdapterSample.java | 17 +- advanced/pom.xml | 2 +- applications/cafe-scripted/pom.xml | 16 +- applications/cafe/cafe-amqp/pom.xml | 2 +- applications/cafe/cafe-jms/pom.xml | 2 +- applications/cafe/cafe-si/pom.xml | 2 +- applications/cafe/pom.xml | 14 +- applications/loan-broker/pom.xml | 16 +- .../samples/loanbroker/LoanBrokerGateway.java | 10 +- .../loanshark/domain/LoanShark.java | 205 ++++++------ .../loanshark/web/SharkController.java | 181 ++++++----- applications/pom.xml | 2 +- basic/amqp/pom.xml | 16 +- .../spring-integration-context.xml | 69 +++-- basic/control-bus/pom.xml | 21 +- basic/enricher/pom.xml | 18 +- basic/feed/pom.xml | 27 +- basic/file/pom.xml | 4 +- basic/ftp/pom.xml | 21 +- .../FtpOutboundGatewaySample-context.xml | 32 +- basic/helloworld/pom.xml | 47 +-- basic/http/pom.xml | 31 +- .../samples/http/RequestGateway.java | 6 +- basic/jdbc/README.md | 34 +- basic/jdbc/pom.xml | 18 +- .../integration/samples/jdbc/Main.java | 9 +- basic/jms/pom.xml | 71 +++-- .../samples/jms/ChannelAdapterDemo.java | 14 +- basic/jmx/pom.xml | 21 +- basic/jpa/pom.xml | 14 +- basic/mail/pom.xml | 23 +- basic/mongodb/README.md | 94 +++--- basic/mongodb/pom.xml | 53 +--- .../mongodb/outbound/mongodb-out-config.xml | 8 +- basic/oddeven/pom.xml | 143 ++++----- .../integration/intervalOddEvenDemo.xml | 2 +- basic/pom.xml | 2 +- basic/quote/README.md | 8 +- basic/quote/pom.xml | 19 +- basic/sftp/README.md | 2 +- basic/sftp/pom.xml | 19 +- .../SftpInboundReceiveSample-context.xml | 10 +- .../SftpOutboundGatewaySample-context.xml | 4 +- .../SftpOutboundTransferSample-context.xml | 8 +- basic/tcp-amqp/README.md | 20 +- basic/tcp-amqp/pom.xml | 221 ++++++------- .../spring-integration-context.xml | 28 +- basic/tcp-client-server/README.md | 20 +- basic/tcp-client-server/pom.xml | 34 +- basic/testing-examples/pom.xml | 99 +++--- .../externalgateway/WeatherAndTraffic.java | 7 +- .../samples/testing/gateway/VoidGateway.java | 6 +- basic/twitter/README.md | 26 +- basic/twitter/pom.xml | 12 +- basic/ws-inbound-gateway/README.md | 6 +- basic/ws-inbound-gateway/pom.xml | 21 +- basic/ws-outbound-gateway/README.md | 18 +- basic/ws-outbound-gateway/pom.xml | 37 ++- basic/xml/README.md | 20 +- basic/xml/pom.xml | 35 ++- basic/xmpp/README.md | 7 +- basic/xmpp/pom.xml | 21 +- .../ReceiveInstantMessageSample-context.xml | 16 +- .../SendInstantMessageSample-context.xml | 32 +- basic/xmpp/src/test/resources/log4j.xml | 2 +- basic/xquery/pom.xml | 4 +- intermediate/async-gateway/pom.xml | 21 +- intermediate/dynamic-poller/pom.xml | 120 ++++---- .../spring-integration-context.xml | 33 +- intermediate/errorhandling/pom.xml | 21 +- intermediate/file-processing/pom.xml | 19 +- intermediate/mail-attachments/pom.xml | 4 +- intermediate/monitoring/pom.xml | 218 ++++++------- intermediate/multipart-http/pom.xml | 32 +- .../multipart/MultipartRequestGateway.java | 19 +- intermediate/pom.xml | 6 +- intermediate/rest-http/pom.xml | 291 +++++++++--------- intermediate/retry-and-more/pom.xml | 59 ++-- intermediate/stored-procedures-derby/pom.xml | 18 +- intermediate/stored-procedures-ms/pom.xml | 2 +- intermediate/stored-procedures-oracle/pom.xml | 12 +- .../stored-procedures-postgresql/pom.xml | 2 +- .../org/springframework/integration/Main.java | 2 +- .../spring-integration-context.xml | 11 +- .../tcp-client-server-multiplex/pom.xml | 23 +- .../tcpclientserver/SimpleGateway.java | 5 +- intermediate/travel/pom.xml | 13 +- .../samples/travel/TravelGateway.java | 4 +- intermediate/tx-synch/pom.xml | 69 +++-- pom.xml | 4 + 93 files changed, 1666 insertions(+), 1454 deletions(-) diff --git a/README.md b/README.md index 7824df8e..ae645d44 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ Spring Integration Samples # Introduction -Welcome to the Spring Integration Samples. To simplify your experience, Spring Integration Samples were split into 4 distinct categories: +Welcome to the **Spring Integration Samples** repository which provides **50+ samples** to help you learn [Spring Integration][]. To simplify your experience, the *Spring Integration* samples are split into 4 distinct categories: * Basic * Intermediate * Advanced * Applications -Inside of each category you'll find a 'README.md' which will contain a more detailed description of that category's specifics. Each sample also comes with its own 'readme.txt' file explaining details. +Inside of each category you'll find a **README.md** file, which will contain a more detailed description of that category. Each sample also comes with its own **README.md** file explaining further details, e.g. how to run the respective sample. *Happy Integration!* @@ -31,21 +31,26 @@ Below is a short description of each category. This is a good place to get started. The samples here are technically motivated and demonstrate the bare minimum with regard to configuration and code to help you to get introduced to the basic concepts, API and configuration of Spring Integration. For example, if you are looking for an answer on how to wire a **Service Activator** to a **Channel** or how to apply a **Gateway** to your message exchange or how to get started with using the **MAIL** or **XML** module, this would be the right place to find a relevant sample. The bottom line is that this is a good starting point. -* **amqp** - demonstrates the functionality of the various **AMQP Adapters** -* **control-bus** - demonstrates the functionality of the **Control Bus** -* **feed** - demonstrates the functionality of the **Feed Adapter** (RSS/ATOM) -* **file** - demonstrates aspects of the various File Adapters (e.g. **File Inbound/Outbound Channel Adapters**, file **polling**) -* **ftp** - demonstrates the **FTP support** available with Spring Integration -* **helloworld** - very simple starting example illustrating a basic message flow (using **Channel**, **ServiceActivator**, **QueueChannel**) -* **http** - demonstrates request/reply communication when using a pair of **HTTP Inbound/Outbound gateways** -* **jms** - demonstrates **JMS** support available with Spring Integration -* **jmx** - demonstrates **JMX** support using a **JMX Attribute Polling Channel** and **JMX Operation Invoking Channel Adapter** -* **mail** - example showing **IMAP** and **POP3** support +* **amqp** - Demonstrates the functionality of the various **AMQP Adapters** +* **control-bus** - Demonstrates the functionality of the **Control Bus** +* **enricher** - This sample demonstrates how the Enricher components can be used +* **feed** - Demonstrates the functionality of the **Feed Adapter** (RSS/ATOM) +* **file** - Demonstrates aspects of the various File Adapters (e.g. **File Inbound/Outbound Channel Adapters**, file **polling**) +* **ftp** - Demonstrates the **FTP support** available with Spring Integration +* **helloworld** - Very simple starting example illustrating a basic message flow (using **Channel**, **ServiceActivator**, **QueueChannel**) +* **http** - Demonstrates request/reply communication when using a pair of **HTTP Inbound/Outbound gateways** +* **jdbc** - Illustrates the usage of the Jdbc Adapters, including object persistence and retrieval +* **jms** - Demonstrates **JMS** support available with Spring Integration +* **jmx** - Demonstrates **JMX** support using a **JMX Attribute Polling Channel** and **JMX Operation Invoking Channel Adapter** +* **jpa** - Shows the usage of the JPA Components can be used +* **mail** - Example showing **IMAP** and **POP3** support +* **mongodb** - Shows how to persist a Message payload to a **MongoDb** document store and how to read documents from **MongoDb** * **oddeven** - Example combining the functionality of **Inbound Channel Adapter**, **Filter**, **Router** and **Poller** * **jpa** - This sample illustrates how the JPA Components can be used * **quote** - Example demoing core EIP support using **Channel Adapter (Inbound and Stdout)**, **Poller** with Interval Trigers, **Service Activator** -* **sftp** - demonstrating SFTP support using **SFTP Inbound / Outbound Channel Adapters** -* **tcp-client-server** - demonstrates socket communication using **TcpOutboundGateway**, **TcpInboundGateway** and also uses a **Gateway** and a **Service Activator** +* **sftp** - Demonstrating SFTP support using **SFTP Inbound / Outbound Channel Adapters** +* **tcp-amqp** - Demonstrates basic functionality of bridging the **Spring Integration TCP Adapters** with **Spring Integration AMQP Adapters** +* **tcp-client-server** - Demonstrates socket communication using **TcpOutboundGateway**, **TcpInboundGateway** and also uses a **Gateway** and a **Service Activator** * **testing-examples** - A series of test cases that show techniques to **test** Spring Integration applications. * **twitter** - Illustrates Twitter support using the **Twitter Inbound Channel Adapter**, **Twitter Inbound Search Channel Adapter**, **Twitter Outbound Channel Adapter** * **ws-inbound-gateway** - Example showing basic functionality of the **Web Service Gateway** @@ -58,36 +63,41 @@ This is a good place to get started. The samples here are technically motivated This category targets developers who are already more familiar with the Spring Integration framework (past getting started), but need some more guidance while resolving more advanced technical problems that you have to deal with when switching to a Messaging architecture. For example, if you are looking for an answer on how to handle errors in various scenarios, or how to properly configure an **Aggregator** for the situations where some messages might not ever arrive for aggregation, or any other issue that goes beyond a basic understanding and configuration of a particular component to address "what else you can do?" types of problems, this would be the right place to find relevant examples. +* **async-gateway** - Usage example of an asynchronous **Gateway** * **dynamic-poller** - Example shows usage of a **Poller** with a custom **Trigger** to change polling periods at runtime * **async-gateway** - Example shows usage of an **Asynchronous Gateway** * **errorhandling** - Demonstrates basic **Error Handling** capabilities of Spring Integration * **file-processing** - Sample demonstrates how to wire a message flow to process files either sequentially (maintain the order) or concurrently (no order). * **mail-attachments** - Demonstrates the processing of email attachments +* **monitoring** The project used in the *[Spring Integration Management and Monitoring Webinar](http://www.springsource.org/node/3598)* Also available on the *[SpringSourceDev YouTube Channel](http://www.youtube.com/SpringSourceDev)* * **multipart-http** - Demonstrates the sending of HTTP multipart requests using Spring's **RestTemplate** and a Spring Integration **Http Outbound Gateway** -* **travel** - More sophisticated example showing the retrieval of weather (SOAP Web Service) and traffic (HTTP Service) reports using real services -* **tcp-client-server-multiplex** - Demonstrates the use of *Collaborating Channel Adapters* -* **stored-procedures-derby** Provides an example of the stored procedure Outbound Gateway using *[Apache Derby](http://db.apache.org/derby/)* -* **stored-procedures-oracle** Provides an example of the stored procedure Outbound Gateway using *ORACLE XE* -* **stored-procedures-postgresql** Provides an example of the stored procedure Outbound Gateway using *[PostgreSQL](http://www.postgresql.org/)* * **rest-http** - This sample demonstrates how to send an HTTP request to a Spring Integration's HTTP service while utilizing Spring Integration's new HTTP Path usage. This sample also uses Spring Security for HTTP Basic authentication. With HTTP Path facility, the client program can send requests with URL Variables. +* **retry-and-more** Provides samples showing the application of MessageHandler Advice Chains to endpoints - retry, circuit breaker, expression evaluating * **splitter-aggregator-reaper** A demonstration of implementing the Splitter and Aggregator *Enterprise Integration Patterns* (EIP) together. This sample also provides a concrete example of a [message store reaper][] in action. * **stored-procedures-derby** Provides an example of the stored procedure Outbound Gateway using *[Apache Derby](http://db.apache.org/derby/)* +* **stored-procedures-ms** Provides an example of the stored procedure Outbound Gateway using *Microsoft SQL Server* * **stored-procedures-oracle** Provides an example of the stored procedure Outbound Gateway using *ORACLE XE* -* **monitoring** The project used in the *[Spring Integration Management and Monitoring Webinar](http://www.springsource.org/node/3598)* Also available on the *[SpringSourceDev YouTube Channel](http://www.youtube.com/SpringSourceDev)* -* **retry-and-more** Provides samples showing the application of MessageHandler Advice Chains to endpoints - retry, circuit breaker, expression evaluating -* **tx-synch** Provides a sample demonstrating the use of transaction syncrhonization, renaming an input file to a different filename, depending on whether the transaction commits, or rolls back. +* **stored-procedures-postgresql** Provides an example of the stored procedure Outbound Gateway using *[PostgreSQL](http://www.postgresql.org/)* +* **tcp-client-server-multiplex** - Demonstrates the use of *Collaborating Channel Adapters* +* **travel** - More sophisticated example showing the retrieval of weather (SOAP Web Service) and traffic (HTTP Service) reports using real services +* **tx-synch** Provides a sample demonstrating the use of transaction synchronization, renaming an input file to a different filename, depending on whether the transaction commits, or rolls back. ## Advanced This category targets advanced developers who are quite familiar with Spring Integration but are looking to address a specific custom need by extending the Spring Integration public API. For example, if you are looking for samples showing how to implement a custom **Channel** or **Consumer** (event-based or polling-based), or you are trying to figure out what is the most appropriate way to implement a custom **BeanParser** on top of the Spring Integration BeanParser hierarchy when implementing a custom namespace, this would be the right place to look. Here you can also find samples that will help you with adapter development. Spring Integration comes with an extensive library of adapters that allow you to connect remote systems with the Spring Integration messaging framework. However you might have a need to integrate with a system for which the core framework does not provide an adapter, so you have to implement your own. This category would include samples showing you how to implement various adapters. * **advanced-testing-examples** - Example test cases that show advanced techniques to test Spring Integration applications +* **dynamic-ftp** - Demonstrates one technique for sending files to dynamic destinations. ## Applications This category targets developers and architects who have a good understanding of Message-Driven architecture and Enterprise Integration Patterns, and have an above average understanding of Spring and Spring integration and who are looking for samples that address a particular business problem. In other words, the emphasis of samples in this category is '**business use cases**' and how they can be solved via a Messaging architecture and Spring Integration in particular. For example, if you are interested to see how a Loan Broker process or Travel Agent process could be implemented and automated via Spring Integration, this would be the right place to find these types of samples. -* **cafe** - Emulates a simple operation of a coffee shop combining various Spring Integration adapters (Including **Router** and **Splitter**) see [Appendix A of the reference documentation](http://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html) for more details +* **cafe** - Emulates a simple operation of a coffee shop combining various Spring Integration adapters (Including **Router** and **Splitter**) see [Appendix A of the reference documentation](http://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html) for more details. Implementations are provided for: + - AMQP + - JMS + - In memory channels +* **cafe-scripted** - Scripted implementation of the classic **cafe** sample application. Supports **JavaScript**, **Groovy**, **Ruby**, and **Python**. * **loan-broker** - Simulates a simple banking application (Uses **Gateway**, **Chain**, **Header Enricher**, **Recipient List Router**, **Aggregator**) see [Appendix A of the reference documentation](http://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html) for more details * **loanshark** This extension to the loan broker sample shows how to exchange messages between Spring Integration applications (and other technologies) using **UDP**. diff --git a/advanced/advanced-testing-examples/pom.xml b/advanced/advanced-testing-examples/pom.xml index b4524670..449eed81 100644 --- a/advanced/advanced-testing-examples/pom.xml +++ b/advanced/advanced-testing-examples/pom.xml @@ -4,13 +4,13 @@ 4.0.0 org.springframework.integration.samples advanced-testing-examples - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Advanced) - Advanced Testing Examples jar - UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE 1.2.16 4.10 diff --git a/advanced/dynamic-ftp/pom.xml b/advanced/dynamic-ftp/pom.xml index 5813853d..6d268038 100644 --- a/advanced/dynamic-ftp/pom.xml +++ b/advanced/dynamic-ftp/pom.xml @@ -2,14 +2,14 @@ 4.0.0 org.springframework.integration.samples dynamic-ftp - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Advanced) - Dynamic FTP Demo jar - UTF-8 - 3.1.0.RELEASE - 2.2.0.M1 - 1.2.16 + UTF-8 + 3.1.3.RELEASE + 2.2.0.RC3 + 1.2.17 4.10 @@ -54,17 +54,18 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true maven-surefire-plugin + 2.12.4 **/*Tests.java diff --git a/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java b/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java index 514d732c..03ef1935 100644 --- a/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java +++ b/advanced/dynamic-ftp/src/test/java/org/springframework/integration/samples/ftp/FtpOutboundChannelAdapterSample.java @@ -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(); diff --git a/advanced/pom.xml b/advanced/pom.xml index 6c8928b1..ac62d465 100644 --- a/advanced/pom.xml +++ b/advanced/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.integration.samples advanced-samples - 2.1.0.RELEASE + 2.2.0.BUILD-SNAPSHOT Spring Integration Samples - Advanced pom diff --git a/applications/cafe-scripted/pom.xml b/applications/cafe-scripted/pom.xml index f4eb0792..1f124684 100644 --- a/applications/cafe-scripted/pom.xml +++ b/applications/cafe-scripted/pom.xml @@ -4,13 +4,13 @@ 4.0.0 org.springframework.integration.samples cafe-scripted - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Applications) - Cafe Sample (Scripted Implementation) - UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.17 4.10 @@ -114,13 +114,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 + 1.6 1.6 -Xlint:all true - false + true diff --git a/applications/cafe/cafe-amqp/pom.xml b/applications/cafe/cafe-amqp/pom.xml index 6b3fb242..1c130faa 100644 --- a/applications/cafe/cafe-amqp/pom.xml +++ b/applications/cafe/cafe-amqp/pom.xml @@ -6,7 +6,7 @@ cafe org.springframework.integration.samples - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT cafe-amqp diff --git a/applications/cafe/cafe-jms/pom.xml b/applications/cafe/cafe-jms/pom.xml index 3c90b291..b6b8981d 100644 --- a/applications/cafe/cafe-jms/pom.xml +++ b/applications/cafe/cafe-jms/pom.xml @@ -6,7 +6,7 @@ org.springframework.integration.samples cafe - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT cafe-jms diff --git a/applications/cafe/cafe-si/pom.xml b/applications/cafe/cafe-si/pom.xml index d5bf1639..7eed7d89 100644 --- a/applications/cafe/cafe-si/pom.xml +++ b/applications/cafe/cafe-si/pom.xml @@ -6,7 +6,7 @@ cafe org.springframework.integration.samples - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT cafe-si diff --git a/applications/cafe/pom.xml b/applications/cafe/pom.xml index 25f106e6..fe0d9eb2 100644 --- a/applications/cafe/pom.xml +++ b/applications/cafe/pom.xml @@ -5,7 +5,7 @@ org.springframework.integration.samples cafe pom - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT 2.2.1 @@ -21,9 +21,9 @@ UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.17 4.10 @@ -70,10 +70,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true true diff --git a/applications/loan-broker/pom.xml b/applications/loan-broker/pom.xml index b017e4e9..a2a30010 100644 --- a/applications/loan-broker/pom.xml +++ b/applications/loan-broker/pom.xml @@ -4,13 +4,13 @@ 4.0.0 org.springframework.integration.samples loan-broker - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Applications) - Loan Broker - UTF-8 - 2.1.0.RELEASE + UTF-8 + 2.2.0.RC3 1.1.1 - 1.2.16 + 1.2.17 4.10 @@ -41,13 +41,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java index 38820a09..fd51feca 100644 --- a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java +++ b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2012 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. @@ -24,19 +24,21 @@ import org.springframework.integration.samples.loanbroker.domain.LoanRequest; /** * POJI Gateway that connects method invocations to the request-channel. * This completely isolates the developer from Spring Integration API details. - * + * * @author Oleg Zhurakousky + * @author Gunnar Hillert + * */ public interface LoanBrokerGateway { /** * Will return the best {@link LoanQuote} for the given request. */ - public LoanQuote getBestLoanQuote(LoanRequest loanRequest); + LoanQuote getBestLoanQuote(LoanRequest loanRequest); /** * Will return all {@link LoanQuote}s for the given request. */ - public List getAllLoanQuotes(LoanRequest loanRequest); + List getAllLoanQuotes(LoanRequest loanRequest); } diff --git a/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java b/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java index 391d63e8..ddc65092 100644 --- a/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java +++ b/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java @@ -1,3 +1,18 @@ +/* + * Copyright 2002-2012 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. + * 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.springframework.integration.samples.loanbroker.loanshark.domain; import java.util.ArrayList; @@ -24,151 +39,163 @@ import flexjson.JSONSerializer; @Entity public class LoanShark { - private String name; + private String name; - private Long counter; + private Long counter; - private Double averageRate; + private Double averageRate; public String toJson() { - return new JSONSerializer().exclude("*.class").serialize(this); - } + return new JSONSerializer().exclude("*.class").serialize(this); + } public static LoanShark fromJsonToLoanShark(String json) { - return new JSONDeserializer().use(null, LoanShark.class).deserialize(json); - } + return new JSONDeserializer().use(null, LoanShark.class).deserialize(json); + } public static String toJsonArray(Collection collection) { - return new JSONSerializer().exclude("*.class").serialize(collection); - } + return new JSONSerializer().exclude("*.class").serialize(collection); + } public static Collection fromJsonArrayToLoanSharks(String json) { - return new JSONDeserializer>().use(null, ArrayList.class).use("values", LoanShark.class).deserialize(json); - } + return new JSONDeserializer>().use(null, ArrayList.class).use("values", LoanShark.class).deserialize(json); + } @PersistenceContext - transient EntityManager entityManager; + transient EntityManager entityManager; @Id - @GeneratedValue(strategy = GenerationType.AUTO) - @Column(name = "id") - private Long id; + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name = "id") + private Long id; @Version - @Column(name = "version") - private Integer version; + @Column(name = "version") + private Integer version; public Long getId() { - return this.id; - } + return this.id; + } public void setId(Long id) { - this.id = id; - } + this.id = id; + } public Integer getVersion() { - return this.version; - } + return this.version; + } public void setVersion(Integer version) { - this.version = version; - } + this.version = version; + } @Transactional - public void persist() { - if (this.entityManager == null) this.entityManager = entityManager(); - this.entityManager.persist(this); - } + public void persist() { + if (this.entityManager == null) { + this.entityManager = entityManager(); + } + this.entityManager.persist(this); + } @Transactional - public void remove() { - if (this.entityManager == null) this.entityManager = entityManager(); - if (this.entityManager.contains(this)) { - this.entityManager.remove(this); - } else { - LoanShark attached = this.entityManager.find(this.getClass(), this.id); - this.entityManager.remove(attached); - } - } + public void remove() { + if (this.entityManager == null) { + this.entityManager = entityManager(); + } + if (this.entityManager.contains(this)) { + this.entityManager.remove(this); + } else { + LoanShark attached = this.entityManager.find(this.getClass(), this.id); + this.entityManager.remove(attached); + } + } @Transactional - public void flush() { - if (this.entityManager == null) this.entityManager = entityManager(); - this.entityManager.flush(); - } + public void flush() { + if (this.entityManager == null) { + this.entityManager = entityManager(); + } + this.entityManager.flush(); + } @Transactional - public LoanShark merge() { - if (this.entityManager == null) this.entityManager = entityManager(); - LoanShark merged = this.entityManager.merge(this); - this.entityManager.flush(); - return merged; - } + public LoanShark merge() { + if (this.entityManager == null) { + this.entityManager = entityManager(); + } + LoanShark merged = this.entityManager.merge(this); + this.entityManager.flush(); + return merged; + } public static final EntityManager entityManager() { - EntityManager em = new LoanShark().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em; - } + EntityManager em = new LoanShark().entityManager; + if (em == null) { + throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + } + return em; + } public static long countLoanSharks() { - return ((Number) entityManager().createQuery("select count(o) from LoanShark o").getSingleResult()).longValue(); - } + return ((Number) entityManager().createQuery("select count(o) from LoanShark o").getSingleResult()).longValue(); + } @SuppressWarnings("unchecked") - public static List findAllLoanSharks() { - return entityManager().createQuery("select o from LoanShark o").getResultList(); - } + public static List findAllLoanSharks() { + return entityManager().createQuery("select o from LoanShark o").getResultList(); + } public static LoanShark findLoanShark(Long id) { - if (id == null) return null; - return entityManager().find(LoanShark.class, id); - } + if (id == null) return null; + return entityManager().find(LoanShark.class, id); + } @SuppressWarnings("unchecked") - public static List findLoanSharkEntries(int firstResult, int maxResults) { - return entityManager().createQuery("select o from LoanShark o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); - } + public static List findLoanSharkEntries(int firstResult, int maxResults) { + return entityManager().createQuery("select o from LoanShark o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); + } public String getName() { - return this.name; - } + return this.name; + } public void setName(String name) { - this.name = name; - } + this.name = name; + } public Long getCounter() { - return this.counter; - } + return this.counter; + } public void setCounter(Long counter) { - this.counter = counter; - } + this.counter = counter; + } public Double getAverageRate() { - return this.averageRate; - } + return this.averageRate; + } public void setAverageRate(Double averageRate) { - this.averageRate = averageRate; - } + this.averageRate = averageRate; + } public static Query findLoanSharksByName(String name) { - if (name == null || name.length() == 0) throw new IllegalArgumentException("The name argument is required"); - EntityManager em = LoanShark.entityManager(); - Query q = em.createQuery("SELECT LoanShark FROM LoanShark AS loanshark WHERE loanshark.name = :name"); - q.setParameter("name", name); - return q; - } + if (name == null || name.length() == 0) { + throw new IllegalArgumentException("The name argument is required"); + } + EntityManager em = LoanShark.entityManager(); + Query q = em.createQuery("SELECT LoanShark FROM LoanShark AS loanshark WHERE loanshark.name = :name"); + q.setParameter("name", name); + return q; + } public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("Id: ").append(getId()).append(", "); - sb.append("Version: ").append(getVersion()).append(", "); - sb.append("Name: ").append(getName()).append(", "); - sb.append("Counter: ").append(getCounter()).append(", "); - sb.append("AverageRate: ").append(getAverageRate()); - return sb.toString(); - } + StringBuilder sb = new StringBuilder(); + sb.append("Id: ").append(getId()).append(", "); + sb.append("Version: ").append(getVersion()).append(", "); + sb.append("Name: ").append(getName()).append(", "); + sb.append("Counter: ").append(getCounter()).append(", "); + sb.append("AverageRate: ").append(getAverageRate()); + return sb.toString(); + } } diff --git a/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java b/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java index 3572b9fa..fc523c97 100644 --- a/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java +++ b/applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java @@ -1,3 +1,18 @@ +/* + * Copyright 2002-2012 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. + * 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.springframework.integration.samples.loanbroker.loanshark.web; import javax.validation.Valid; @@ -24,115 +39,115 @@ import org.springframework.web.bind.annotation.ResponseBody; public class SharkController { @RequestMapping(method = RequestMethod.POST) - public String create(@Valid LoanShark loanShark, BindingResult result, Model model) { - if (result.hasErrors()) { - model.addAttribute("loanShark", loanShark); - return "loansharks/create"; - } - loanShark.persist(); - return "redirect:/loansharks/" + loanShark.getId(); - } + public String create(@Valid LoanShark loanShark, BindingResult result, Model model) { + if (result.hasErrors()) { + model.addAttribute("loanShark", loanShark); + return "loansharks/create"; + } + loanShark.persist(); + return "redirect:/loansharks/" + loanShark.getId(); + } @RequestMapping(params = "form", method = RequestMethod.GET) - public String createForm(Model model) { - model.addAttribute("loanShark", new LoanShark()); - return "loansharks/create"; - } + public String createForm(Model model) { + model.addAttribute("loanShark", new LoanShark()); + return "loansharks/create"; + } @RequestMapping(value = "/{id}", method = RequestMethod.GET) - public String show(@PathVariable("id") Long id, Model model) { - model.addAttribute("loanshark", LoanShark.findLoanShark(id)); - model.addAttribute("itemId", id); - return "loansharks/show"; - } + public String show(@PathVariable("id") Long id, Model model) { + model.addAttribute("loanshark", LoanShark.findLoanShark(id)); + model.addAttribute("itemId", id); + return "loansharks/show"; + } @RequestMapping(method = RequestMethod.GET) - public String list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model model) { - if (page != null || size != null) { - int sizeNo = size == null ? 10 : size.intValue(); - model.addAttribute("loansharks", LoanShark.findLoanSharkEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo)); - float nrOfPages = (float) LoanShark.countLoanSharks() / sizeNo; - model.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages)); - } else { - model.addAttribute("loansharks", LoanShark.findAllLoanSharks()); - } - return "loansharks/list"; - } + public String list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model model) { + if (page != null || size != null) { + int sizeNo = size == null ? 10 : size.intValue(); + model.addAttribute("loansharks", LoanShark.findLoanSharkEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo)); + float nrOfPages = (float) LoanShark.countLoanSharks() / sizeNo; + model.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages)); + } else { + model.addAttribute("loansharks", LoanShark.findAllLoanSharks()); + } + return "loansharks/list"; + } @RequestMapping(method = RequestMethod.PUT) - public String update(@Valid LoanShark loanShark, BindingResult result, Model model) { - if (result.hasErrors()) { - model.addAttribute("loanShark", loanShark); - return "loansharks/update"; - } - loanShark.merge(); - return "redirect:/loansharks/" + loanShark.getId(); - } + public String update(@Valid LoanShark loanShark, BindingResult result, Model model) { + if (result.hasErrors()) { + model.addAttribute("loanShark", loanShark); + return "loansharks/update"; + } + loanShark.merge(); + return "redirect:/loansharks/" + loanShark.getId(); + } @RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET) - public String updateForm(@PathVariable("id") Long id, Model model) { - model.addAttribute("loanShark", LoanShark.findLoanShark(id)); - return "loansharks/update"; - } + public String updateForm(@PathVariable("id") Long id, Model model) { + model.addAttribute("loanShark", LoanShark.findLoanShark(id)); + return "loansharks/update"; + } @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) - public String delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model model) { - LoanShark.findLoanShark(id).remove(); - model.addAttribute("page", (page == null) ? "1" : page.toString()); - model.addAttribute("size", (size == null) ? "10" : size.toString()); - return "redirect:/loansharks?page=" + ((page == null) ? "1" : page.toString()) + "&size=" + ((size == null) ? "10" : size.toString()); - } + public String delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model model) { + LoanShark.findLoanShark(id).remove(); + model.addAttribute("page", (page == null) ? "1" : page.toString()); + model.addAttribute("size", (size == null) ? "10" : size.toString()); + return "redirect:/loansharks?page=" + ((page == null) ? "1" : page.toString()) + "&size=" + ((size == null) ? "10" : size.toString()); + } @RequestMapping(params = { "find=ByName", "form" }, method = RequestMethod.GET) - public String findLoanSharksByNameForm(Model model) { - return "loansharks/findLoanSharksByName"; - } + public String findLoanSharksByNameForm(Model model) { + return "loansharks/findLoanSharksByName"; + } @RequestMapping(params = "find=ByName", method = RequestMethod.GET) - public String findLoanSharksByName(@RequestParam("name") String name, Model model) { - model.addAttribute("loansharks", LoanShark.findLoanSharksByName(name).getResultList()); - return "loansharks/list"; - } + public String findLoanSharksByName(@RequestParam("name") String name, Model model) { + model.addAttribute("loansharks", LoanShark.findLoanSharksByName(name).getResultList()); + return "loansharks/list"; + } Converter getLoanSharkConverter() { - return new Converter() { - public String convert(LoanShark loanShark) { - return new StringBuilder().append(loanShark.getName()).append(" ").append(loanShark.getCounter()).append(" ").append(loanShark.getAverageRate()).toString(); - } - }; - } + return new Converter() { + public String convert(LoanShark loanShark) { + return new StringBuilder().append(loanShark.getName()).append(" ").append(loanShark.getCounter()).append(" ").append(loanShark.getAverageRate()).toString(); + } + }; + } @InitBinder - void registerConverters(WebDataBinder binder) { - if (binder.getConversionService() instanceof GenericConversionService) { - GenericConversionService conversionService = (GenericConversionService) binder.getConversionService(); - conversionService.addConverter(getLoanSharkConverter()); - } - } + void registerConverters(WebDataBinder binder) { + if (binder.getConversionService() instanceof GenericConversionService) { + GenericConversionService conversionService = (GenericConversionService) binder.getConversionService(); + conversionService.addConverter(getLoanSharkConverter()); + } + } @RequestMapping(value = "/{id}", method = RequestMethod.GET, headers = "Accept=application/json") - @ResponseBody - public String showJson(@PathVariable("id") Long id) { - return LoanShark.findLoanShark(id).toJson(); - } + @ResponseBody + public String showJson(@PathVariable("id") Long id) { + return LoanShark.findLoanShark(id).toJson(); + } @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json") - public ResponseEntity createFromJson(@RequestBody String json) { - LoanShark.fromJsonToLoanShark(json).persist(); - return new ResponseEntity("LoanShark created", HttpStatus.CREATED); - } + public ResponseEntity createFromJson(@RequestBody String json) { + LoanShark.fromJsonToLoanShark(json).persist(); + return new ResponseEntity("LoanShark created", HttpStatus.CREATED); + } @RequestMapping(headers = "Accept=application/json") - @ResponseBody - public String listJson() { - return LoanShark.toJsonArray(LoanShark.findAllLoanSharks()); - } + @ResponseBody + public String listJson() { + return LoanShark.toJsonArray(LoanShark.findAllLoanSharks()); + } @RequestMapping(value = "/jsonArray", method = RequestMethod.POST, headers = "Accept=application/json") - public ResponseEntity createFromJsonArray(@RequestBody String json) { - for (LoanShark loanshark: LoanShark.fromJsonArrayToLoanSharks(json)) { - loanshark.persist(); - } - return new ResponseEntity("LoanShark created", HttpStatus.CREATED); - } + public ResponseEntity createFromJsonArray(@RequestBody String json) { + for (LoanShark loanshark: LoanShark.fromJsonArrayToLoanSharks(json)) { + loanshark.persist(); + } + return new ResponseEntity("LoanShark created", HttpStatus.CREATED); + } } diff --git a/applications/pom.xml b/applications/pom.xml index 35da45fd..7dcb6c70 100644 --- a/applications/pom.xml +++ b/applications/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.integration.samples applications - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Spring Integration Samples - Applications pom diff --git a/basic/amqp/pom.xml b/basic/amqp/pom.xml index 3edaf6cd..becb2293 100644 --- a/basic/amqp/pom.xml +++ b/basic/amqp/pom.xml @@ -4,16 +4,20 @@ org.springframework.integration.samples amqp - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar Samples (Basic) - AMQP http://www.springsource.org/spring-integration + + 2.2.1 + + UTF-8 - 2.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -29,7 +33,7 @@ maven-eclipse-plugin - 2.8 + 2.9 org.springframework.ide.eclipse.core.springnature @@ -44,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 @@ -56,7 +60,7 @@ org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 org.springframework.integration.samples.amqp.Main diff --git a/basic/amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml b/basic/amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml index 125457f0..a888f97c 100644 --- a/basic/amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml +++ b/basic/amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml @@ -1,7 +1,6 @@ - - - - - + - + + + - + - + - + - - - - - - - - - + - + + + + + - + - + - + - + - - - - - + + + + + + + + + + + diff --git a/basic/control-bus/pom.xml b/basic/control-bus/pom.xml index 2b3c5cd3..8a05d34f 100644 --- a/basic/control-bus/pom.xml +++ b/basic/control-bus/pom.xml @@ -4,13 +4,18 @@ 4.0.0 org.springframework.integration.samples control-bus - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - Control Bus jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -36,13 +41,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/enricher/pom.xml b/basic/enricher/pom.xml index c232e8d2..b71b8bc6 100644 --- a/basic/enricher/pom.xml +++ b/basic/enricher/pom.xml @@ -4,16 +4,20 @@ org.springframework.integration.samples enricher - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar Samples (Basic) - Enricher http://www.springsource.org/spring-integration + + 2.2.1 + + UTF-8 - 2.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -29,7 +33,7 @@ maven-eclipse-plugin - 2.8 + 2.9 org.springframework.ide.eclipse.core.springnature @@ -44,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 @@ -56,7 +60,7 @@ org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 org.springframework.integration.samples.enricher.Main @@ -96,7 +100,7 @@ com.h2database h2 - 1.3.162 + 1.3.168 diff --git a/basic/feed/pom.xml b/basic/feed/pom.xml index 20ebb218..fba38130 100644 --- a/basic/feed/pom.xml +++ b/basic/feed/pom.xml @@ -1,14 +1,19 @@ - 4.0.0 - org.springframework.integration.samples - feed - 2.1.0.BUILD-SNAPSHOT + 4.0.0 + org.springframework.integration.samples + feed + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - Feed Demo (RSS/ATOM) jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC2 + 1.2.17 4.10 @@ -34,13 +39,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/file/pom.xml b/basic/file/pom.xml index 75d59ccc..a67b8240 100644 --- a/basic/file/pom.xml +++ b/basic/file/pom.xml @@ -11,8 +11,8 @@ 2.2.1 - UTF-8 - 2.2.0.RC2 + UTF-8 + 2.2.0.RC3 1.2.17 4.10 diff --git a/basic/ftp/pom.xml b/basic/ftp/pom.xml index f0f45164..f1d24bdd 100644 --- a/basic/ftp/pom.xml +++ b/basic/ftp/pom.xml @@ -3,13 +3,18 @@ 4.0.0 org.springframework.integration.samples ftp - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - FTP Demo jar + + + 2.2.1 + + UTF-8 - 2.2.0.M1 - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -22,7 +27,7 @@ commons-io commons-io - 2.1 + 2.4 @@ -57,13 +62,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/ftp/src/test/resources/META-INF/spring/integration/FtpOutboundGatewaySample-context.xml b/basic/ftp/src/test/resources/META-INF/spring/integration/FtpOutboundGatewaySample-context.xml index 8113bcb5..35d714b8 100644 --- a/basic/ftp/src/test/resources/META-INF/spring/integration/FtpOutboundGatewaySample-context.xml +++ b/basic/ftp/src/test/resources/META-INF/spring/integration/FtpOutboundGatewaySample-context.xml @@ -4,7 +4,7 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp" - xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.1.xsd + xsi:schemaLocation="http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> @@ -29,12 +29,12 @@ command-options="" expression="payload" reply-channel="toSplitter"/> - - - - - - + + + + + + @@ -45,25 +45,25 @@ session-factory="ftpSessionFactory" request-channel="toGet" reply-channel="toRemoveChannel" - command="get" + command="get" command-options="-P" expression="payload.remoteDirectory + '/' + payload.filename"/> - - - - - + + + + + - + - - + diff --git a/basic/helloworld/pom.xml b/basic/helloworld/pom.xml index 122b6fa5..b9a3e6de 100644 --- a/basic/helloworld/pom.xml +++ b/basic/helloworld/pom.xml @@ -4,30 +4,35 @@ 4.0.0 org.springframework.integration.samples helloworld - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - Hello World Sample jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 org.springframework.integration.samples.helloworld.HelloWorldApp - - hello - - org.springframework.integration.samples.helloworld.HelloWorldApp - - - - poller - - org.springframework.integration.samples.helloworld.PollerApp - - + + hello + + org.springframework.integration.samples.helloworld.HelloWorldApp + + + + poller + + org.springframework.integration.samples.helloworld.PollerApp + + @@ -53,19 +58,19 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 ${java.main.class} diff --git a/basic/http/pom.xml b/basic/http/pom.xml index 346fbd85..8c5b372e 100644 --- a/basic/http/pom.xml +++ b/basic/http/pom.xml @@ -3,16 +3,21 @@ 4.0.0 org.springframework.integration.samples http - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - HTTP Demo war + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE - 1.2 + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.2 1.3.2 - 1.2.16 + 1.2.17 @@ -43,7 +48,7 @@ javax.mail mail - 1.4.1 + 1.4.5 log4j @@ -56,19 +61,19 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 org.springframework.integration.samples.http.HttpClientDemo @@ -76,7 +81,7 @@ org.mortbay.jetty maven-jetty-plugin - 6.1.10 + 6.1.26 diff --git a/basic/http/src/main/java/org/springframework/integration/samples/http/RequestGateway.java b/basic/http/src/main/java/org/springframework/integration/samples/http/RequestGateway.java index 17bb7ae5..8261824e 100644 --- a/basic/http/src/main/java/org/springframework/integration/samples/http/RequestGateway.java +++ b/basic/http/src/main/java/org/springframework/integration/samples/http/RequestGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2012 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. @@ -18,9 +18,11 @@ package org.springframework.integration.samples.http; /** * @author Oleg Zhurakousky + * @author Gunnar Hillert * */ public interface RequestGateway { - public String echo(String request); + String echo(String request); + } diff --git a/basic/jdbc/README.md b/basic/jdbc/README.md index d065f02c..4db2cbe1 100644 --- a/basic/jdbc/README.md +++ b/basic/jdbc/README.md @@ -1,23 +1,19 @@ Spring Integration - JDBC Sample ================================ -# Overview +## Overview -This sample provides example of how the Jdbc Adapters can be used. +This sample provides example of how the JDBC Adapters can be used. The example presented covers the following use cases * Find a Person detail from the database based on the name provided * Create a new Person record in the table -The first example demonstrates the use of outbound gateway to search for a person record using the -spring integration's jdbc outbound gateway +The first example demonstrates the use of *Outbound Gateway* to search for a person record using *Spring Integration*'s *JDBC Outbound Gateway*. -The second example on other hand demonstrates how the jdbc outbound gateway be used to create a new -Person record and then return the newly created Person record. -This example demonstrates how to make use of the sql parameter source factory to extract -the required values to be inserted/updated/selected in the query provided. +The second example on other hand demonstrates how the *JDBC Outbound Gateway* can be used to create a new *Person* record and then return the newly created *Person* record. This example demonstrates how to make use of the sql parameter source factory to extract the required values to be inserted/updated/selected in the query provided. -# Getting Started +## Getting Started You can run the application by either @@ -26,18 +22,18 @@ You can run the application by either - mvn package - mvn exec:java -Make an appropriate choice for searching a Person or creating a Person +Make an appropriate choice for searching a Person or creating a Person. -For creating the person record, select the appropriate steps as prompted by the application +For creating the person record, select the appropriate steps as prompted by the application. -On creation of Person records, you may choose the option of selecting the created person records and view their details +On creation of *Person* records, you may choose the option of selecting the created person records and view their details. -#Some details about the sample "Person Outbound Gateway" +## Details We use the outbound gateway to insert records in a Person table based on the values contained in the message payload that is received over the channel to the adapter. -The following are used to configure the gateway +The following are used to configure the *Gateway*: * The request and reply channels * The data source for the database @@ -47,7 +43,7 @@ The following are used to configure the gateway * Optional reply SQL Parameter source factory * RowMapper if you intend to map the ResultSet to your custom object -The following sequence of events happen when we invoke the createPerson method on the gateway +The following sequence of events happen when we invoke the *createPerson* method on the *Gateway*: * The parameter of type Person is sent as a payload of a message over the reply-channel * The outbound gateway reads this message and extracts the payload @@ -61,10 +57,12 @@ The following sequence of events happen when we invoke the createPerson method o * The Person object is then sent as a payload of the Message over the reply channel. * The Person payload is extracted from the Message and returned to the calling application. -For executing the program and see the results, execute the junit test case -org.springframework.integration.samples.jdbc.OutboundGatewayTest +## Running the Sample -# Resources +For executing the program and see the results, execute the junit test case +**org.springframework.integration.samples.jdbc.OutboundGatewayTest** + +## Resources For help please take a look at the Spring Integration documentation: diff --git a/basic/jdbc/pom.xml b/basic/jdbc/pom.xml index 5bdf34a0..be4bf4d5 100644 --- a/basic/jdbc/pom.xml +++ b/basic/jdbc/pom.xml @@ -4,16 +4,20 @@ org.springframework.integration.samples jdbc - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar Samples (Basic) - JDBC http://www.springsource.org/spring-integration + + 2.2.1 + + UTF-8 - 2.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -29,7 +33,7 @@ maven-eclipse-plugin - 2.8 + 2.9 org.springframework.ide.eclipse.core.springnature @@ -44,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 @@ -56,7 +60,7 @@ org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 org.springframework.integration.samples.jdbc.Main @@ -102,7 +106,7 @@ com.h2database h2 - 1.3.162 + 1.3.168 diff --git a/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java b/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java index e3e7061d..2da9961d 100644 --- a/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java +++ b/basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/Main.java @@ -80,14 +80,15 @@ public final class Main { System.out.print("Enter you choice: "); while (true) { final String input = scanner.nextLine(); - if("1".equals(input.trim())) + if("1".equals(input.trim())) { getPersonDetails(scanner, personService); - else if("2".equals(input.trim())) + } else if("2".equals(input.trim())) { createPersonDetails(scanner,personService); - else if("q".equals(input.trim())) + } else if("q".equals(input.trim())) { break; - else + } else { System.out.println("Invalid choice\n\n"); + } System.out.println("Please enter a choice and press : "); System.out.println("\t1. Find person details"); diff --git a/basic/jms/pom.xml b/basic/jms/pom.xml index 75d242ef..a40604f4 100644 --- a/basic/jms/pom.xml +++ b/basic/jms/pom.xml @@ -4,24 +4,29 @@ 4.0.0 org.springframework.integration.samples jms - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - JMS jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 5.5.1 - 1.6.4 - 4.10 + UTF-8 + 2.2.0.RC3 + 5.7.0 + 1.7.2 + 4.10 - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + org.apache.activemq @@ -38,33 +43,33 @@ - - org.springframework - spring-jms - 3.1.0.RELEASE - compile - + + org.springframework + spring-jms + 3.1.3.RELEASE + compile + org.springframework.integration spring-integration-core ${spring.integration.version} - - - org.springframework.integration - spring-integration-jms - ${spring.integration.version} - + + + org.springframework.integration + spring-integration-jms + ${spring.integration.version} + org.springframework.integration spring-integration-stream ${spring.integration.version} - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + @@ -72,13 +77,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java b/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java index 0c53be59..cee8b3b6 100644 --- a/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java +++ b/basic/jms/src/test/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2012 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,18 +16,7 @@ package org.springframework.integration.samples.jms; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -import junit.framework.Assert; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.support.MessageBuilder; /** * A simple bootstrap main() method for starting a pair of JMS Channel @@ -39,6 +28,7 @@ import org.springframework.integration.support.MessageBuilder; * See the configuration in the three XML files that are referenced below. * * @author Mark Fisher + * @author Gunnar Hillert */ public class ChannelAdapterDemo { diff --git a/basic/jmx/pom.xml b/basic/jmx/pom.xml index 3dc05381..a1996a28 100644 --- a/basic/jmx/pom.xml +++ b/basic/jmx/pom.xml @@ -5,12 +5,17 @@ org.springframework.integration.samples jmx Samples (Basic) - JMX - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -41,13 +46,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/jpa/pom.xml b/basic/jpa/pom.xml index b0ba59d8..fa35797d 100644 --- a/basic/jpa/pom.xml +++ b/basic/jpa/pom.xml @@ -11,18 +11,18 @@ http://www.springsource.org/spring-integration - 2.2.0 + 2.2.1 UTF-8 - 2.2.0.M2 - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 2.2.0 2.3.2 4.0.1.Final - 3.1.1.RELEASE + 3.1.3.RELEASE @@ -49,7 +49,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 @@ -117,7 +117,7 @@ org.slf4j slf4j-log4j12 - 1.6.4 + 1.7.2 @@ -125,7 +125,7 @@ com.h2database h2 - 1.3.162 + 1.3.168 diff --git a/basic/mail/pom.xml b/basic/mail/pom.xml index 319264f2..366c51e5 100644 --- a/basic/mail/pom.xml +++ b/basic/mail/pom.xml @@ -4,11 +4,16 @@ org.springframework.integration.samples mail Samples (Basic) - Mail Demo (IMAP + POP3) - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -26,7 +31,7 @@ javax.mail mail - 1.4.4 + 1.4.5 log4j @@ -45,13 +50,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/mongodb/README.md b/basic/mongodb/README.md index f4536946..f2825f81 100644 --- a/basic/mongodb/README.md +++ b/basic/mongodb/README.md @@ -1,82 +1,68 @@ -

MongoDb Outbound Channel Adapter

-MongoDb Outbound Channel Adapter allows you to write the Message payload to a MongoDb document store. +Spring Integration - MongoDb Sample +================================ -You can see the simplest configuration of the MongoDb Channel Adapter below: +### MongoDb Outbound Channel Adapter -```` - -```` +The *MongoDb Outbound Channel Adapter* allows you to write the Message payload to a MongoDb document store. You can see the simplest configuration of the MongoDb Channel Adapter below: -It will be initialized with the default instance of the MongoDbFactory (the default bean name is 'mongoDbFactory') otherwise you can provide its -reference via mongodb-factory attribute. + -Now you can run the MongoDbOutboundAdapterDemo. After running it open terminal window and start MongoDb CLI +It will be initialized with the default instance of the **MongoDbFactory** (the default bean name is 'mongoDbFactory') otherwise you can provide its +reference via **mongodb-factory** attribute. -```` -$> mongo -```` +Now you can run the **MongoDbOutboundAdapterDemo**. After running it open terminal window and start MongoDb CLI + + $ mongo Once in MongoDb CLI type a query: -```` -> db.data.find({}) -```` + > db.data.find({}) And you should see the 3 document entries we just created: -```` -{ "_id" : ObjectId("505ff83d03649ed6881d066b"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "John", "lname" : "Doe", "address" : { "street" : "3401 Hillview Ave", "city" : "Palo Alto", "zip" : "94304", "state" : "CA" } } -{ "_id" : ObjectId("505ff83d03649ed6881d066c"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "Josh", "lname" : "Doe", "address" : { "street" : "123 Main st", "city" : "San Francisco", "zip" : "94115", "state" : "CA" } } -{ "_id" : ObjectId("505ff83d03649ed6881d066d"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "Jane", "lname" : "Doe", "address" : { "street" : "2323 Market st", "city" : "Philadelphia", "zip" : "19152", "state" : "PA" } } -```` -Note that our entries were represented by a very simple Java Beans style objects which were converted into JSON string using default converters. -Let's try to complicate the issue slightly. We are going to try to store a simple coma delimited String in our MongoDbOutboundAdapterDemo().runSimpleComplexAdapter() demo: + { "_id" : ObjectId("505ff83d03649ed6881d066b"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "John", "lname" : "Doe", "address" : { "street" : "3401 Hillview Ave", "city" : "Palo Alto", "zip" : "94304", "state" : "CA" } } + { "_id" : ObjectId("505ff83d03649ed6881d066c"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "Josh", "lname" : "Doe", "address" : { "street" : "123 Main st", "city" : "San Francisco", "zip" : "94115", "state" : "CA" } } + { "_id" : ObjectId("505ff83d03649ed6881d066d"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "Jane", "lname" : "Doe", "address" : { "street" : "2323 Market st", "city" : "Philadelphia", "zip" : "19152", "state" : "PA" } } -```` -messageChannel.send(new GenericMessage("John Dow, Palo Alto, 3401 Hillview Ave, 94304, CA")); -```` +Note that our entries were represented by a very simple Java Beans style objects which were converted into JSON string using default converters. Let's try to complicate the issue slightly. We are going to try to store a simple coma delimited String in our **MongoDbOutboundAdapterDemo().runSimpleComplexAdapter()** demo: + + messageChannel.send(new GenericMessage("John Dow, Palo Alto, 3401 Hillview Ave, 94304, CA")); As you can see we are sending a Message with the String payload which represents a person. Executing this code will result in: -```` -Caused by: java.lang.IllegalArgumentException: can't serialize class java.lang.Character -```` -That is because MongoDb attempts to convert the underlying string using default set of converters that are based on Java Beans convention. -In any case that is not what we are looking for in this case anyway since we want to store this object as a document with each field represented individually so we need to parse this string into a set of fields first. To do so we will apply a custom MongoConverter. Modify the sample configuration of simpleAdapterWithConverter to add a reference to an already configured converter. -```` - -```` + Run the demo again and you'll see that it will succeed this time and you should see the stored object as: -```` -{ "_id" : ObjectId("505ffeac0364f8a92337657e"), "fname" : "John", "lname" : "Dow", "address" : { "city" : "Palo Alto", "street" : "3401 Hillview Ave", "zip" : "94304", "state" : "CA" } } -```` + + { "_id" : ObjectId("505ffeac0364f8a92337657e"), "fname" : "John", "lname" : "Dow", "address" : { "city" : "Palo Alto", "street" : "3401 Hillview Ave", "zip" : "94304", "state" : "CA" } } + This time the conversion is done using a provided converter and you can see in the StringConverter.write(..) method that all that we are doing is parsing the input String and adding its data as an individual fields to an instance of the DBObject. -For even more complex scenarios you can also bootstrap the adapter with the custom instance of the MongoTemplate, but its out of scope of this blog. +For even more complex scenarios you can also bootstrap the adapter with the custom instance of the **MongoTemplate**, but its out of scope of this blog. -

MongoDb Inbound Channel Adapter

-MongoDb Inbound Channel Adapter allows you to read documents from the MongoDb and send them as Message payloads downstream. +### MongoDb Inbound Channel Adapter< -This simple example shows you how to read the documents stored in the MongoDb. For this example we'll use data stored by the MongoDb Outbound Channel Adapter discussed in the previous section. +MongoDb Inbound Channel Adapter allows you to read documents from the MongoDb and send them as Message payloads downstream. This simple example shows you how to read the documents stored in the MongoDb. For this example we'll use data stored by the MongoDb Outbound Channel Adapter discussed in the previous section. As you can see from the example below, the configuration of MongoDb Inbound Channel Adapter is very similar to any other polling Inbound Channel Adapter. -```` - - -```` + -Notice the query attribute which allows you to provide JSON queries represented as simple String. For more information on MongoDb queries please refer to MongoDb documentation -In the above case we are selecting all documents where state element of the address element is 'CA'. As you may have guessed the MongoDb Inbound Channel Adapter returns List by default, so you can easily configure a very basic splitter downstream (as in this example) to process one message at the time. Run the MongoDbInboundAdapterDemo and you should see the results in the console: +Notice the **query** attribute which allows you to provide JSON queries represented as simple String. For more information on MongoDb queries please refer to [MongoDb documentation](http://www.mongodb.org/display/DOCS/Querying) +In the above case we are selecting all documents where *state* element of the *address* element is **'CA'**. As you may have guessed the MongoDb Inbound Channel Adapter returns List by default, so you can easily configure a very basic splitter downstream (as in this example) to process one message at the time. Run the **MongoDbInboundAdapterDemo** and you should see the results in the console: -```` -04:37:30.720 WARN . . . { "_id" : { "$oid" : "50601bca0364063859066bcd"} , "_class" : "org.springframework.integration.samples.mongodb.domain.Person" , "fname" : "John" , "lname" : "Doe" , "address" : { "street" : "3401 Hillview Ave" , "city" : "Palo Alto" , "zip" : "94304" , "state" : "CA"}} -04:37:30.722 WARN . . . { "_id" : { "$oid" : "50601bca0364063859066bce"} , "_class" : "org.springframework.integration.samples.mongodb.domain.Person" , "fname" : "Josh" , "lname" : "Doe" , "address" : { "street" : "123 Main st" , "city" : "San Francisco" , "zip" : "94115" , "state" : "CA"}} -```` -However, if you know that your query can only return a single result you can avoid returning List by configuring expect-single-result attribute setting its value to 'true'. + 04:37:30.720 WARN . . . { "_id" : { "$oid" : "50601bca0364063859066bcd"} , "_class" : "org.springframework.integration.samples.mongodb.domain.Person" , "fname" : "John" , "lname" : "Doe" , "address" : { "street" : "3401 Hillview Ave" , "city" : "Palo Alto" , "zip" : "94304" , "state" : "CA"}} + 04:37:30.722 WARN . . . { "_id" : { "$oid" : "50601bca0364063859066bce"} , "_class" : "org.springframework.integration.samples.mongodb.domain.Person" , "fname" : "Josh" , "lname" : "Doe" , "address" : { "street" : "123 Main st" , "city" : "San Francisco" , "zip" : "94115" , "state" : "CA"}} -Also, you may wish to do some post-processing to the successfully processed data that was read from the MongoDb. -For example; you may want to move or remove a document after its been processed. -You can do this using Transaction Synchronization feature that was added with Spring Integration 2.2 and which will be discussed in the next blog in this series expected in a few days (from Gary Russell). However the impatient once can get more details now by reading MongoDb Inbound Channel Adapter section of the reference manual http://static.springsource.org/spring-integration/docs/2.2.0.RC1/reference/htmlsingle/#mongodb-inbound-channel-adapter +However, if you know that your query can only return a single result you can avoid returning List by configuring **expect-single-result** attribute setting its value to *true*. + +Also, you may wish to do some post-processing to the successfully processed data that was read from the MongoDb. For example; you may want to move or remove a document after its been processed. +You can do this using Transaction Synchronization feature that was added with *Spring Integration 2.2* and which will be discussed in the next blog in this series expected in a few days (from Gary Russell). However the impatient once can get more details now by reading MongoDb Inbound Channel Adapter section of the reference manual [http://static.springsource.org/spring-integration/docs/2.2.0.RC3/reference/htmlsingle/#mongodb-inbound-channel-adapter](http://static.springsource.org/spring-integration/docs/2.2.0.RC3/reference/htmlsingle/#mongodb-inbound-channel-adapter). diff --git a/basic/mongodb/pom.xml b/basic/mongodb/pom.xml index 65514998..a7edfd93 100644 --- a/basic/mongodb/pom.xml +++ b/basic/mongodb/pom.xml @@ -4,16 +4,20 @@ org.springframework.integration.samples mongodb - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar Samples (Basic) - MongoDb http://www.springsource.org/spring-integration + + 2.2.1 + + UTF-8 - 2.2.0.RC1 - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -29,7 +33,7 @@ maven-eclipse-plugin - 2.8 + 2.9 org.springframework.ide.eclipse.core.springnature @@ -44,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 @@ -56,49 +60,12 @@ org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 org.springframework.integration.samples.jdbc.Main - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.apache.maven.plugins - - - maven-compiler-plugin - - - [2.3.2,) - - - testCompile - compile - - - - - - - - - - - -
diff --git a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/mongodb-out-config.xml b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/mongodb-out-config.xml index ff8aac21..d865a056 100644 --- a/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/mongodb-out-config.xml +++ b/basic/mongodb/src/main/java/org/springframework/integration/samples/mongodb/outbound/mongodb-out-config.xml @@ -11,13 +11,13 @@ - + - - + + - + diff --git a/basic/oddeven/pom.xml b/basic/oddeven/pom.xml index 1bf12e8d..7361fd5c 100644 --- a/basic/oddeven/pom.xml +++ b/basic/oddeven/pom.xml @@ -1,77 +1,82 @@ - 4.0.0 - org.springframework.integration.samples - oddeven - Samples (Basic) - Odd-Even Sample - 2.1.0.BUILD-SNAPSHOT - jar - - UTF-8 - 2.1.0.RELEASE - 1.2.16 - 4.10 - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + org.springframework.integration.samples + oddeven + Samples (Basic) - Odd-Even Sample + 2.2.0.BUILD-SNAPSHOT + jar - - - cron - - org.springframework.integration.samples.oddeven.CronOddEvenDemo - - - - interval - - org.springframework.integration.samples.oddeven.IntervalOddEvenDemoTestApp - - - + + 2.2.1 + - - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - - - log4j - log4j - ${log4j.version} - - - - junit - junit - ${junit.version} - - + + UTF-8 + 2.2.0.RC3 + 1.2.17 + 4.10 + - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.5 - 1.5 - -Xlint:all - true - false - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - ${java.main.class} - - - - + + + cron + + org.springframework.integration.samples.oddeven.CronOddEvenDemo + + + + interval + + org.springframework.integration.samples.oddeven.IntervalOddEvenDemoTestApp + + + + + + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + + + log4j + log4j + ${log4j.version} + + + + junit + junit + ${junit.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + ${java.main.class} + + + + repo.springsource.org.milestone diff --git a/basic/oddeven/src/main/resources/META-INF/spring/integration/intervalOddEvenDemo.xml b/basic/oddeven/src/main/resources/META-INF/spring/integration/intervalOddEvenDemo.xml index 1aac0833..200e4a8c 100644 --- a/basic/oddeven/src/main/resources/META-INF/spring/integration/intervalOddEvenDemo.xml +++ b/basic/oddeven/src/main/resources/META-INF/spring/integration/intervalOddEvenDemo.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/integration - http://www.springframework.org/schema/integration/spring-integration-2.1.xsd"> + http://www.springframework.org/schema/integration/spring-integration.xsd"> diff --git a/basic/pom.xml b/basic/pom.xml index ebf2a342..4dac11fa 100644 --- a/basic/pom.xml +++ b/basic/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.springframework.integration.samples basic-samples - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Spring Integration Samples - Basic pom diff --git a/basic/quote/README.md b/basic/quote/README.md index f0d0e32c..63328269 100644 --- a/basic/quote/README.md +++ b/basic/quote/README.md @@ -4,14 +4,14 @@ Quote Sample This example demonstrates the following aspects of the CORE EIP support available with Spring Integration: 1. Channel Adapter (Inbound and Stdout) -2. Poller with Interval Trigers +2. Poller with Interval Triggers 3. Service Activator -It is a very simple example that introduces you to the Channel adapters and Pollers. +It is a very simple example that introduces you to Channel adapters and Pollers. -Messages are simply being emitted by the Poller (interval based) triggering **nextTicker()** method of *TickerStream* class and sent to a **tickers** channel from which they are retrieved by the *TickerStream* service. +Messages are simply being emitted by the *Poller* (interval based) triggering the **nextTicker()** method of the *TickerStream* class and are then sent to a **tickers** channel, from which they are retrieved by the *TickerStream* service. -*TickerStream* service generates random ticker symbols sending them to the **quotes** channel from which they are retrieved by the *QuoteService* (annotation based Service Activator). *QuoteService* generates random quotes sending them to the *Stdout Channel Adapter* where they are printed to a console. +The *TickerStream* service generates random ticker symbols, sending them to the **quotes** channel, from which they are retrieved by the *QuoteService* (annotation based Service Activator). The *QuoteService* generates random quotes, sending them to the *Stdout Channel Adapter*, where they are printed to the console. To execute sample simply run **QuoteDemoTest**. You should see the output similar to this: diff --git a/basic/quote/pom.xml b/basic/quote/pom.xml index f943893e..3d540851 100644 --- a/basic/quote/pom.xml +++ b/basic/quote/pom.xml @@ -5,12 +5,15 @@ org.springframework.integration.samples quote Samples (Basic) - Quote Sample - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar + + 2.2.1 + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -36,13 +39,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/sftp/README.md b/basic/sftp/README.md index 632dc418..ad03f1c2 100644 --- a/basic/sftp/README.md +++ b/basic/sftp/README.md @@ -68,4 +68,4 @@ This sample uses a property **private.keyfile** to point to the location of your >$ chmod 600 ~/.ssh/authorized_keys * Then edit **authorized_keys** file and paste in the contents of the public key file **sftp_rsa.pub**. -* Move your private key file **sftp_rsa** to META-INF/keys directory +* Move your private key file **sftp_rsa** to the directory **/src/test/resources/META-INF/keys/** directory. diff --git a/basic/sftp/pom.xml b/basic/sftp/pom.xml index 5aaaa49a..7b499358 100644 --- a/basic/sftp/pom.xml +++ b/basic/sftp/pom.xml @@ -3,13 +3,16 @@ 4.0.0 org.springframework.integration.samples sftp - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - SFTP Demo jar + + 2.2.1 + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -35,13 +38,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml index e5e881ce..757ce519 100644 --- a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml +++ b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpInboundReceiveSample-context.xml @@ -20,10 +20,10 @@ - + - + - + diff --git a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundGatewaySample-context.xml b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundGatewaySample-context.xml index bef29176..c939e0c6 100644 --- a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundGatewaySample-context.xml +++ b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundGatewaySample-context.xml @@ -47,7 +47,7 @@ expression="headers['file_remoteDirectory'] + '/' + headers['file_remoteFile']" request-channel="toRm" command="rm"/> - + - + diff --git a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundTransferSample-context.xml b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundTransferSample-context.xml index afb80682..d9b65a03 100644 --- a/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundTransferSample-context.xml +++ b/basic/sftp/src/test/resources/META-INF/spring/integration/SftpOutboundTransferSample-context.xml @@ -10,7 +10,7 @@ http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd"> - + @@ -18,13 +18,13 @@ - + - + - + diff --git a/basic/tcp-amqp/README.md b/basic/tcp-amqp/README.md index f1a03a59..c2bbd29e 100644 --- a/basic/tcp-amqp/README.md +++ b/basic/tcp-amqp/README.md @@ -5,7 +5,7 @@ Spring Integration - TCP-AMQP Sample This sample demonstrates basic functionality of bridging **Spring Integration TCP Adapters** with **Spring Integration AMQP Adapters**. -Once the application is started, you enter some text in a telnet session and the data is written to an AMQP queue, which is then consumed and the result echoed to a netcat session. +Once the application is started, you enter some text in a telnet session and the data is written to an AMQP queue, which is then consumed and the result echoed to a [netcat][] session. telnet->tcp-inbound-adapter->rabbit->tcp-outbound-adapter->netcat @@ -16,6 +16,14 @@ netcat: http://en.wikipedia.org/wiki/Netcat # How to Run the Sample +## Start netcat + +In a terminal window start [netcat][], listening on port *11112*: + + netcat -l -p 11112 + +## Start the Application + If you imported the example into your IDE, you can just run class **org.springframework.integration.samples.tcpamqp.Main**. For example in [SpringSource Tool Suite](http://www.springsource.com/developer/sts) (STS) do: * Right-click on Main class --> Run As --> Java Application @@ -24,15 +32,13 @@ Alternatively, you can start the sample from the command line ([Maven](http://ma * mvn exec:java -In another terminal start netcat, listening on port 11112 +## Run Telnet - netcat -l 11112 - -In another terminat, telnet to localhost:11111 +In another terminal window, telnet to localhost:11111 telnet localhost 11111 -Data typed into the telnet terminal will be echoed to the netcat terminal, via the rabbit queue. +Data typed into the telnet terminal will be echoed to the [netcat][] terminal, via the rabbit queue. # Used Spring Integration components @@ -52,3 +58,5 @@ Some further resources: * RabbitMQ - [http://www.rabbitmq.com/](http://www.rabbitmq.com/) * Spring AMQP - [http://www.springsource.org/spring-amqp](http://www.springsource.org/spring-amqp) + +[netcat]: http://en.wikipedia.org/wiki/Netcat \ No newline at end of file diff --git a/basic/tcp-amqp/pom.xml b/basic/tcp-amqp/pom.xml index c0bf0141..33f9eef2 100644 --- a/basic/tcp-amqp/pom.xml +++ b/basic/tcp-amqp/pom.xml @@ -1,21 +1,26 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - tcp-amqp - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + tcp-amqp + 2.2.0.BUILD-SNAPSHOT + jar - Samples (Basic) - TCP-AMQP - http://www.springsource.org/spring-integration + Samples (Basic) - TCP-AMQP + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.6.4 - 4.10 - + + 2.2.1 + + + + UTF-8 + 1.1.3.RELEASE + 2.2.0.RC3 + 1.6.4 + 4.10 + @@ -25,109 +30,109 @@ - - - - maven-eclipse-plugin - 2.8 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.samples.tcpamqp.Main - - - - + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.springframework.integration.samples.tcpamqp.Main + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - - org.springframework.integration - spring-integration-amqp - ${spring.integration.version} - + + org.springframework.integration + spring-integration-amqp + ${spring.integration.version} + - - org.springframework.integration - spring-integration-groovy - ${spring.integration.version} - + + org.springframework.integration + spring-integration-groovy + ${spring.integration.version} + - - org.springframework.integration - spring-integration-ip - ${spring.integration.version} - - - org.springframework.amqp - spring-rabbit - 1.0.1.BUILD-SNAPSHOT - + + org.springframework.integration + spring-integration-ip + ${spring.integration.version} + + + org.springframework.amqp + spring-rabbit + ${spring.amqp.version} + - + - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - log4j-over-slf4j - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + log4j-over-slf4j + ${slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + - + diff --git a/basic/tcp-amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml b/basic/tcp-amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml index 1cf0a493..4f277d9e 100644 --- a/basic/tcp-amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml +++ b/basic/tcp-amqp/src/main/resources/META-INF/spring/integration/spring-integration-context.xml @@ -20,7 +20,7 @@ @@ -29,26 +29,26 @@ queue-names="si.test.queue" connection-factory="connectionFactory" /> - + - - - + - + - + - + - + - - - - - + + + + + + + diff --git a/basic/tcp-client-server/README.md b/basic/tcp-client-server/README.md index 4ec514a9..5afb7439 100644 --- a/basic/tcp-client-server/README.md +++ b/basic/tcp-client-server/README.md @@ -1,17 +1,19 @@ TCP Sample ========== -This is a place to get started with the Transmission Control Protocol (TCP). It demonstrates a simple message flow represented by the diagram below: +This is a place to get started with the [Transmission Control Protocol][] (TCP). It demonstrates a simple message flow represented by the diagram below: Gateway -> Channel -> TcpOutboundGateway -> <===Socket===> -> TcpInboundGateway -> Channel -> ServiceActivator -The service returns a response which the inbound gateway sends back over the socket to the outbound gateway and the result is returned to the client that invoked the original SimpleGateway method. +The service returns a response which the *Inbound Gateway* sends back over the socket to the *Outbound Gateway* and the result is returned to the client that invoked the original **SimpleGateway** method. -To run sample simply execute a test case in **org.springframework.integration.samples.tcpclientservice** package. +## Running the Sample -Note that the test case includes an alternative configuration that uses the in-built conversion service and the channel dataType attribute, instead of explicit transformers, to convert from byte arrays to Strings. +To run sample simply execute a test case in the **org.springframework.integration.samples.tcpclientserver** package. -Simply change the @ContextConfiguration to switch between the two techniques. In addition, a simple telnet server is provided; see **TelnetServer** in src/main/java. Run this class as a Java application and then use telnet to connect to the service (**telnet localhost 11111**). +Note that the test case includes an alternative configuration that uses the built-in *conversion service* and the channel *dataType* attribute, instead of explicit *Transformers*, to convert from byte arrays to Strings. + +Simply change the *@ContextConfiguration* to switch between the two techniques. In addition, a simple telnet server is provided; see **TelnetServer** in *src/main/java*. Run this class as a Java application and then use `telnet` to connect to the service (**telnet localhost 11111**). Messages sent will be returned, preceded by 'echo:'. @@ -28,7 +30,7 @@ Messages sent will be returned, preceded by 'echo:'. telnet> quit Connection closed. -Note that the test case also demonstrates error handling on an inbound gateway using direct channels. If the payload is 'FAIL', the EchoService throws an exception. The gateway is configured with an error-channel attribute. Messages sent to that channel are consumed by a transformer that concatenates the inbound message payload with the message text from the thrown exception, returning **FAIL:Failure Demonstration** over the TCP socket. +>Note that the test case also demonstrates error handling on an inbound gateway using direct channels. If the payload is 'FAIL', the EchoService throws an exception. The gateway is configured >with an error-channel attribute. Messages sent to that channel are consumed by a transformer that concatenates the inbound message payload with the message text from the thrown exception, >returning **FAIL:Failure Demonstration** over the TCP socket. This can also be demonstrated with the telnet client thus... @@ -47,8 +49,10 @@ This can also be demonstrated with the telnet client thus... telnet> quit Connection closed. -A third option exists for converting a stream of bytes to a domain object or message payload. You can hook up different serializers/deserializers at the connection factory which will apply the conversions right when the stream comes in to the gateway and right when it goes out. +A third option exists for converting a stream of bytes to a domain object or message payload. You can hook up different serializers/deserializers at the connection factory which will apply the conversions right when the stream comes in to the *Gateway* and right when it goes out. See **TcpServerConnectionDeserializeTest** for using a simple (comes with spring) Stx/Etx serializer. -See **TcpServerCustomSerializerTest** for creating and using your own serializers \ No newline at end of file +See **TcpServerCustomSerializerTest** for creating and using your own serializers + +[Transmission Control Protocol]: http://en.wikipedia.org/wiki/Transmission_Control_Protocol \ No newline at end of file diff --git a/basic/tcp-client-server/pom.xml b/basic/tcp-client-server/pom.xml index e28abc45..21d095a4 100644 --- a/basic/tcp-client-server/pom.xml +++ b/basic/tcp-client-server/pom.xml @@ -4,14 +4,17 @@ 4.0.0 org.springframework.integration.samples tcp-client-server - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - TCP Client Server Sample jar + + 2.2.1 + - UTF-8 - 3.1.0.RELEASE - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 3.1.3.RELEASE + 2.2.0.RC3 + 1.2.17 4.10 @@ -47,25 +50,24 @@ ${spring.version} test - - commons-lang - commons-lang - 2.6 - - - + + commons-lang + commons-lang + 2.6 + + org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/testing-examples/pom.xml b/basic/testing-examples/pom.xml index 2da183b9..1f7fee22 100644 --- a/basic/testing-examples/pom.xml +++ b/basic/testing-examples/pom.xml @@ -4,14 +4,17 @@ 4.0.0 org.springframework.integration.samples testing-examples - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - Testing Examples jar + + 2.2.1 + - UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.17 4.10 @@ -67,62 +70,62 @@ spring-webmvc ${spring.version} - - org.springframework - spring-context - ${spring.version} - - - spring-expression - org.springframework - - - - - org.springframework - spring-oxm - ${spring.version} - + + org.springframework + spring-context + ${spring.version} + + + spring-expression + org.springframework + + + + + org.springframework + spring-oxm + ${spring.version} + - - src/test/java - - **/* - - - **/*.java - - - - src/test/resources - - **/* - - + + src/test/java + + **/* + + + **/*.java + + + + src/test/resources + + **/* + + org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true - maven-surefire-plugin - 2.11 - - - **/*Tests.java - - + maven-surefire-plugin + 2.12.4 + + + **/*Tests.java + + @@ -133,4 +136,4 @@ https://repo.springsource.org/libs-milestone - \ No newline at end of file + diff --git a/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/externalgateway/WeatherAndTraffic.java b/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/externalgateway/WeatherAndTraffic.java index acb3e756..d5f7b32f 100644 --- a/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/externalgateway/WeatherAndTraffic.java +++ b/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/externalgateway/WeatherAndTraffic.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2012 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. @@ -19,11 +19,12 @@ import java.util.List; /** * @author Gary Russell + * @author Gunnar Hillert * @since 2.0.2 * */ public interface WeatherAndTraffic { - public List getByZip(String zip); - + List getByZip(String zip); + } diff --git a/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/gateway/VoidGateway.java b/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/gateway/VoidGateway.java index 228f87c7..f3e687d5 100644 --- a/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/gateway/VoidGateway.java +++ b/basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/gateway/VoidGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2012 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. @@ -20,11 +20,13 @@ import org.springframework.integration.file.FileHeaders; /** * @author Gary Russell + * @author Gunnar Hillert + * * @since 2.0.2 * */ public interface VoidGateway { - + public void process(String thing, @Header(FileHeaders.FILENAME) String fileName); } diff --git a/basic/twitter/README.md b/basic/twitter/README.md index dec07027..3289da75 100644 --- a/basic/twitter/README.md +++ b/basic/twitter/README.md @@ -7,23 +7,23 @@ This example demonstrates the following aspects of the Twitter support available 2. Twitter Inbound Search Channel Adapter - allows you to receive HOME status updates 3. Twitter Outboud Channel Adapter - allows send status updates -In order to run this sample you need to configure OAuth and set the values in the OAuth properties. +In order to run this sample you need to configure [OAuth][] and set the values in the [OAuth][] properties. -To use OAuth authentication/authorization with Twitter you must create new Application on Twitter Developers site. -Follow the directions below to create a new application and obtain consumer keys and access token: +To use [OAuth][] authentication/authorization with Twitter you must create a new Application on the Twitter Developers site. +Follow the directions below to create a new application and obtain the consumer keys and the access token: -* Go to http://dev.twitter.com/ -* Click on 'Create an app' link and fill out all required fields on the form provided; -* Set 'Application Type' to 'Client' and depending on the nature of your application -* Select 'Default Access Type' as 'Read & Write' or 'Read-only' +* Go to [http://dev.twitter.com/](http://dev.twitter.com/) +* Log in to your account +* Go to *My applications*. +* Click on 'Create a new application' link and fill out all required fields on the form provided; * Submit the form. * If everything is successful you'll be presented with the 'Consumer Key' and 'Consumer Secret'. -* Copy both values in the safe place. -* On the same page you should see 'My Access Token' button on the side bar (right). +* Copy both values to a safe place. +* On the same page you should see 'My Access Token' button on bottom of the page. * Click on it and you'll be presented with two more values: 'Access Token' and 'Access Token Secret'. -* Copy these values in a safe place as well. +* Copy these values to a safe place as well. -When done fill out **oauth.properties** file so it looks similar to this. +When done, fill out **oauth.properties** file so it looks similar to this. twitter.oauth.consumerKey=4XzBPabcJQxyBzzzH3TrRQ twitter.oauth.consumerSecret=ab2piKdMfPu8bVa3ab6DAIvIWEVZyMDL0RSEN2I8 @@ -32,5 +32,7 @@ When done fill out **oauth.properties** file so it looks similar to this. NOTE: the above values are not real ;) -Now you ready to execute samples. Just run each sample and look for the output produced by the inbound adapters (**TwitterSearchSample.java** and **TwitterTimelineUpdateSample.java**) +Now you are ready to execute the samples. Just run each sample and look for the output produced by the inbound adapters (**TwitterSearchSample.java** and **TwitterTimelineUpdateSample.java**) The outbound adapter sample (**TwitterSendUpdatesSample.java**) will not produce any output. Instead within seconds you should see your tweet. + +[OAuth]: http://en.wikipedia.org/wiki/OAuth \ No newline at end of file diff --git a/basic/twitter/pom.xml b/basic/twitter/pom.xml index 5bfa833a..82c214bc 100644 --- a/basic/twitter/pom.xml +++ b/basic/twitter/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.springframework.integration.samples twitter - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - Twitter Demo jar @@ -12,8 +12,8 @@ UTF-8 - 2.1.3.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -41,11 +41,11 @@ maven-compiler-plugin 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true
diff --git a/basic/ws-inbound-gateway/README.md b/basic/ws-inbound-gateway/README.md index 4e0d4f2c..8c7d9b69 100644 --- a/basic/ws-inbound-gateway/README.md +++ b/basic/ws-inbound-gateway/README.md @@ -1,9 +1,9 @@ Web Service Inbound Gateway Sample ================================== -This sample demonstrates a barebones *inbound Web Service Gateway*. Take a look at **web.xml** in the WEB-INF directory where the Spring Web Services Message-dispatching Servlet is defined. Then have a look at the **spring-ws-config.xml** file (also in the WEB-INF directory) where the Spring WS EndpointMapping is defined. Finally view the Spring Integration configuration in the **inbound-gateway-config.xml** file within the **org.springframework.integration.samples.ws** package where the actual gateway is defined along with a channel and service-activator. +This sample demonstrates a barebones *inbound Web Service Gateway*. Take a look at **web.xml** in the **WEB-INF** directory where the [Spring Web Services][] Message-dispatching Servlet is defined. Then have a look at the **spring-ws-config.xml** file (also in the **WEB-INF** directory) where the Spring WS EndpointMapping is defined. Finally, view the *Spring Integration* configuration in the **inbound-gateway-config.xml** file within the **org.springframework.integration.samples.ws** package where the actual *Gateway* is defined along with a *Channel* and *Service Activator*. -To use the gateway, you can run the tests that are located within the **src/test/java** directory. One is for standalone testing of the gateway itself, while the other tests the gateway running on a web server. The latter uses Spring Web Services' client-side support. Alternatively, you can simply start the server, and then send invocations with any standalone HTTP client testing tool. The request format should be similar to the following and should be POSTed to the service URL (e.g. http://localhost:8080/ws-inbound-gateway/echoservice): +To use the *Gateway*, you can run the tests that are located within the **src/test/java** directory. One is for standalone testing of the gateway itself, while the other tests the *Gateway* running on a web server. The latter uses [Spring Web Services][]' client-side support. Alternatively, you can simply start the server, and then send invocations with any standalone HTTP client testing tool. The request format should be similar to the following and should be *POST*ed to the service URL (e.g. http://localhost:8080/ws-inbound-gateway/echoservice): @@ -11,3 +11,5 @@ To use the gateway, you can run the tests that are located within the **src/test hello + +[Spring Web Services]: http://www.springsource.org/spring-web-services \ No newline at end of file diff --git a/basic/ws-inbound-gateway/pom.xml b/basic/ws-inbound-gateway/pom.xml index 2d4033b1..dae07fc4 100644 --- a/basic/ws-inbound-gateway/pom.xml +++ b/basic/ws-inbound-gateway/pom.xml @@ -5,13 +5,16 @@ org.springframework.integration.samples ws-inbound-gateway Samples (Basic) - WS Inbound Gateway Sample - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT war + + 2.2.1 + - UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.17 4.10 @@ -47,13 +50,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/ws-outbound-gateway/README.md b/basic/ws-outbound-gateway/README.md index 0caac28a..eb9cd67b 100644 --- a/basic/ws-outbound-gateway/README.md +++ b/basic/ws-outbound-gateway/README.md @@ -1,20 +1,26 @@ WS Outbound Gateway Sample ========================== -This example demonstrates the following aspects of the WS support available with Spring Integration: +This example demonstrates the following aspects of the Web Services (WS) support available with *Spring Integration*: 1. WS Outbound Gateway 2. Content Enricher 3. Composed Message Processor -A very simple example that show you how easy it is to invoke a SOAP based service using Spring Integration. +A very simple example that show you how easy it is to invoke a service based on the [Simple Object Access Protocol][] (SOAP) using *Spring Integration*. -* A Message is simply sent to a channel, where it is retrieved by a *Chain* which consists of a *Header Enricher* and a *WS Outbound Gateway*. -* The *Header Enricher* enriches the Message with the SOAP action header. -* The *WS Outbound Gateway* converts the Message to a SOAP request and sends it to a remote service, which converts a temperature from -Fahrenheit to Celsius and the result is printed to the console. +* A *Message* is sent to a *Channel*, where it is retrieved by a *Chain* which consists of a *Header Enricher* and a *WS Outbound Gateway*. +* The *Header Enricher* enriches the *Message* with the SOAP action header. +* The *WS Outbound Gateway* converts the *Message* to a SOAP request and sends it to a remote service, which converts a temperature from +Fahrenheit (90F) to Celsius (32.2C) and the result is printed to the console: + +```` +32.2222222222222```` + +## Running the Sample To run the sample simply execute **WebServiceDemoTestApp** in package *org.springframework.integration.samples.ws*. You can also execute that class using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/): $ mvn clean package exec:java +[Simple Object Access Protocol]: http://en.wikipedia.org/wiki/SOAP \ No newline at end of file diff --git a/basic/ws-outbound-gateway/pom.xml b/basic/ws-outbound-gateway/pom.xml index ccdc9fb7..ae44809f 100644 --- a/basic/ws-outbound-gateway/pom.xml +++ b/basic/ws-outbound-gateway/pom.xml @@ -5,14 +5,17 @@ org.springframework.integration.samples ws-outbound-gateway Samples (Basic) - WS Outbound Gateway Sample - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar + + 2.2.1 + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 - 1.3 + 1.3.19 1.1.1 @@ -53,23 +56,23 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.springframework.integration.samples.ws.WebServiceDemoTestApp - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.samples.ws.WebServiceDemoTestApp - - diff --git a/basic/xml/README.md b/basic/xml/README.md index 63b8a726..874d8ddd 100644 --- a/basic/xml/README.md +++ b/basic/xml/README.md @@ -1,14 +1,16 @@ XML Sample ========== -This example demonstrates the following aspects of the XML support available with Spring Integration: +This example demonstrates the following aspects of the [Extensible Markup Language][] (XML) support available with *Spring Integration*: -1. XPath Splitter - to split an order with multiple items into several order messages for separate processing. -2. XPath Router - to route messages according to the evaluation of an XPath expression which tests to see if the order item is in stock. -3. XPath Expression - which tests to see if the order item is in stock -3. XSLT Transformer - to transform the payload of the order message into a resupply message where the order item is found to be out of stock. +1. [XPath][] Splitter - to split an order with multiple items into several order messages for separate processing. +2. [XPath][] Router - to route messages according to the evaluation of an [XPath][] expression which tests to see if the order item is in stock. +3. [XPath][] Expression - which tests to see if the order item is in stock +3. [XSLT][] Transformer - to transform the payload of the order message into a resupply message where the order item is found to be out of stock. -To run the sample execute class **org.springframework.integration.samples.xml.BookOrderProcessingTestApp**. With Maven you can run the sample by executing: +## Running the Sample + +To run the sample, execute the class **org.springframework.integration.samples.xml.BookOrderProcessingTestApp**. Alternatively, you can run the sample using [Maven][] by executing: $ mvn clean package exec:java @@ -31,4 +33,8 @@ You should see the following output: 1590596439 - + +[Extensible Markup Language]: http://en.wikipedia.org/wiki/XML +[Maven]: http://maven.apache.org/ +[XPath]: http://en.wikipedia.org/wiki/XPath +[XSLT]: http://en.wikipedia.org/wiki/XSLT diff --git a/basic/xml/pom.xml b/basic/xml/pom.xml index d11aea29..dbb10446 100644 --- a/basic/xml/pom.xml +++ b/basic/xml/pom.xml @@ -5,12 +5,15 @@ org.springframework.integration.samples xml Samples (Basic) - XML Sample - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar + + 2.2.1 + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -36,23 +39,23 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + org.springframework.integration.samples.xml.BookOrderProcessingTestApp - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - org.springframework.integration.samples.xml.BookOrderProcessingTestApp - - diff --git a/basic/xmpp/README.md b/basic/xmpp/README.md index db8cc6b1..dc11c3e7 100644 --- a/basic/xmpp/README.md +++ b/basic/xmpp/README.md @@ -1,7 +1,7 @@ XMPP Sample =========== -This example was prepared for testing with GoogleTalk and demonstrates the following aspects of the *Extensible Messaging and Presence Protocol* (XMPP) support available with Spring Integration: +This example was prepared for testing with [Google Talk][] and demonstrates the following aspects of the [Extensible Messaging and Presence Protocol][] (XMPP) support available with *Spring Integration*: 1. XMPP Inbound Channel Adapter - receive instant messages. 2. XMPP Outboud Channel Adapter - send instant messages. @@ -16,4 +16,7 @@ Everything there was already preset. The only 3 properties you need to provide v You'll also need to test it with your friend or have two Google accounts setup. To test **SendInstantMessageSample.java**, first log on to the account identified via **send.to.user** property and make sure that that account is in your buddy list. Then run the demo. -To test **ReceiveInstantMessageSample.java**, first log on to the account identified via **send.to.user** property. Then run the demo. When demo class is started you'll see on GoggleTalk that your buddy (ReceiveInstantMessageSample.java) has just signed on. Now you can send a message from GoogleTalk and see it appear ion the console. +To test **ReceiveInstantMessageSample.java**, first log on to the account identified via **send.to.user** property. Then run the demo. Now any instant messages sent to your account appear in the console. + +[Google Talk]: http://www.google.com/talk/ +[Extensible Messaging and Presence Protocol]: http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol \ No newline at end of file diff --git a/basic/xmpp/pom.xml b/basic/xmpp/pom.xml index 15387f03..0f024b5b 100644 --- a/basic/xmpp/pom.xml +++ b/basic/xmpp/pom.xml @@ -2,13 +2,18 @@ 4.0.0 org.springframework.integration.samples xmpp - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Basic) - XMPP Demo jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -34,13 +39,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/basic/xmpp/src/test/resources/META-INF/spring/integration/ReceiveInstantMessageSample-context.xml b/basic/xmpp/src/test/resources/META-INF/spring/integration/ReceiveInstantMessageSample-context.xml index 82e9f2c6..6b2de06f 100644 --- a/basic/xmpp/src/test/resources/META-INF/spring/integration/ReceiveInstantMessageSample-context.xml +++ b/basic/xmpp/src/test/resources/META-INF/spring/integration/ReceiveInstantMessageSample-context.xml @@ -8,18 +8,18 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-xmpp="http://www.springframework.org/schema/integration/xmpp"> - + - + user="${user.login}" + password="${user.password}" + host="${user.host}" + service-name="${user.service}" + port="${user.port}"/> + - + \ No newline at end of file diff --git a/basic/xmpp/src/test/resources/META-INF/spring/integration/SendInstantMessageSample-context.xml b/basic/xmpp/src/test/resources/META-INF/spring/integration/SendInstantMessageSample-context.xml index a15b4d66..224671f0 100644 --- a/basic/xmpp/src/test/resources/META-INF/spring/integration/SendInstantMessageSample-context.xml +++ b/basic/xmpp/src/test/resources/META-INF/spring/integration/SendInstantMessageSample-context.xml @@ -8,24 +8,24 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:int="http://www.springframework.org/schema/integration" xmlns:int-xmpp="http://www.springframework.org/schema/integration/xmpp"> - + - - - - - - - - - + user="${user.login}" + password="${user.password}" + host="${user.host}" + service-name="${user.service}" + port="${user.port}"/> + + + + + + + + + - + diff --git a/basic/xmpp/src/test/resources/log4j.xml b/basic/xmpp/src/test/resources/log4j.xml index 40d94ca5..c80a153b 100644 --- a/basic/xmpp/src/test/resources/log4j.xml +++ b/basic/xmpp/src/test/resources/log4j.xml @@ -12,7 +12,7 @@ - + diff --git a/basic/xquery/pom.xml b/basic/xquery/pom.xml index 919682dc..0e5a62a3 100644 --- a/basic/xquery/pom.xml +++ b/basic/xquery/pom.xml @@ -7,7 +7,7 @@ 1.0.0.BUILD-SNAPSHOT jar - xquery + Samples (Basic) - XQuery Sample http://www.springsource.org/spring-integration @@ -16,7 +16,7 @@ UTF-8 - 2.2.0.RC2 + 2.2.0.RC3 1.2.17 4.10 diff --git a/intermediate/async-gateway/pom.xml b/intermediate/async-gateway/pom.xml index 2bea3c2b..180dbd68 100644 --- a/intermediate/async-gateway/pom.xml +++ b/intermediate/async-gateway/pom.xml @@ -3,13 +3,18 @@ 4.0.0 org.springframework.integration.samples async-gateway - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Intermediate) - Async Gateway Demo jar + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -35,13 +40,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/intermediate/dynamic-poller/pom.xml b/intermediate/dynamic-poller/pom.xml index 8e246ad7..f04e39d5 100644 --- a/intermediate/dynamic-poller/pom.xml +++ b/intermediate/dynamic-poller/pom.xml @@ -1,65 +1,69 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.samples - dynamic-poller - 2.1.0.BUILD-SNAPSHOT - jar + org.springframework.integration.samples + dynamic-poller + 2.2.0.BUILD-SNAPSHOT + jar - dynamic-poller - http://www.springsource.org/spring-integration + dynamic-poller + http://www.springsource.org/spring-integration - - UTF-8 - 2.1.0.RELEASE - 1.2.16 - 4.10 - org.springframework.integration.samples.poller.Main - + + 2.2.1 + - - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - - - log4j - log4j - ${log4j.version} - - - - junit - junit - ${junit.version} - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.5 - 1.5 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - ${java.main.class} - - - - + + UTF-8 + 2.2.0.RC3 + 1.2.17 + 4.10 + org.springframework.integration.samples.poller.Main + + + + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + + + log4j + log4j + ${log4j.version} + + + + junit + junit + ${junit.version} + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + ${java.main.class} + + + + repo.springsource.org.milestone @@ -67,4 +71,4 @@ https://repo.springsource.org/libs-milestone - \ No newline at end of file + diff --git a/intermediate/dynamic-poller/src/main/resources/META-INF/spring/integration/spring-integration-context.xml b/intermediate/dynamic-poller/src/main/resources/META-INF/spring/integration/spring-integration-context.xml index 9fd09af6..6af67050 100644 --- a/intermediate/dynamic-poller/src/main/resources/META-INF/spring/integration/spring-integration-context.xml +++ b/intermediate/dynamic-poller/src/main/resources/META-INF/spring/integration/spring-integration-context.xml @@ -1,21 +1,26 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd + http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd" + xmlns:int="http://www.springframework.org/schema/integration" + xmlns:task="http://www.springframework.org/schema/task"> - - - + + + - - - + + + - + - + diff --git a/intermediate/errorhandling/pom.xml b/intermediate/errorhandling/pom.xml index 8393216d..ea71d7be 100644 --- a/intermediate/errorhandling/pom.xml +++ b/intermediate/errorhandling/pom.xml @@ -5,11 +5,16 @@ org.springframework.integration.samples errorhandling Samples (Intermediate) - Error Handling Sample - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT + + + 2.2.1 + + - UTF-8 - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 2.2.0.RC3 + 1.2.17 4.10 @@ -40,13 +45,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/intermediate/file-processing/pom.xml b/intermediate/file-processing/pom.xml index f447978a..5e668193 100644 --- a/intermediate/file-processing/pom.xml +++ b/intermediate/file-processing/pom.xml @@ -2,15 +2,20 @@ 4.0.0 org.springframework.integration.samples file-processing - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Intermediate) - File Processing UTF-8 - 2.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 + + + 2.2.1 + + org.springframework.integration @@ -34,13 +39,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/intermediate/mail-attachments/pom.xml b/intermediate/mail-attachments/pom.xml index 504c8451..510dfd84 100644 --- a/intermediate/mail-attachments/pom.xml +++ b/intermediate/mail-attachments/pom.xml @@ -8,7 +8,7 @@ UTF-8 - 2.2.0.RC1 + 2.2.0.RC3 1.2.17 4.10 @@ -53,7 +53,7 @@ org.springframework spring-test - 3.1.1.RELEASE + 3.1.3.RELEASE test diff --git a/intermediate/monitoring/pom.xml b/intermediate/monitoring/pom.xml index 70f12736..cc421cf9 100644 --- a/intermediate/monitoring/pom.xml +++ b/intermediate/monitoring/pom.xml @@ -1,26 +1,26 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.springframework.integration.sample - monitoring - 2.2.0.BUILD-SNAPSHOT - war + org.springframework.integration.sample + monitoring + 2.2.0.BUILD-SNAPSHOT + war - monitoring - http://www.springsource.org/spring-integration + monitoring + http://www.springsource.org/spring-integration - - 2.2.0 - + + 2.2.1 + - - UTF-8 - 2.2.0.RC1 - 3.1.1.RELEASE - 1.2.16 - 4.10 - + + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.17 + 4.10 + @@ -30,90 +30,90 @@ - - - - maven-eclipse-plugin - 2.9 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - 1.5 - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - + + + + maven-eclipse-plugin + 2.9 + + + org.springframework.ide.eclipse.core.springnature + + + org.springframework.ide.eclipse.core.springbuilder + + true + true + 1.5 + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + -Xlint:all + true + true + + + + - + - + - - junit - junit - ${junit.version} - test - + + junit + junit + ${junit.version} + test + - + - - org.springframework - spring-context - ${org.springframework-version} - + + org.springframework + spring-context + ${org.springframework-version} + - - org.springframework - spring-webmvc - ${org.springframework-version} - + + org.springframework + spring-webmvc + ${org.springframework-version} + - + - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + - - org.springframework.integration - spring-integration-jmx - ${spring.integration.version} - + + org.springframework.integration + spring-integration-jmx + ${spring.integration.version} + - - org.springframework.integration - spring-integration-twitter - ${spring.integration.version} - + + org.springframework.integration + spring-integration-twitter + ${spring.integration.version} + - - org.springframework.integration - spring-integration-groovy - ${spring.integration.version} - + + org.springframework.integration + spring-integration-groovy + ${spring.integration.version} + - + log4j @@ -121,24 +121,24 @@ ${log4j.version} - + - - javax.servlet - servlet-api - 2.5 - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - - + + javax.servlet + servlet-api + 2.5 + provided + + + javax.servlet.jsp + jsp-api + 2.1 + provided + + + javax.servlet + jstl + 1.2 + + diff --git a/intermediate/multipart-http/pom.xml b/intermediate/multipart-http/pom.xml index 24cb22cf..802ef534 100644 --- a/intermediate/multipart-http/pom.xml +++ b/intermediate/multipart-http/pom.xml @@ -3,32 +3,32 @@ 4.0.0 org.springframework.integration.samples multipart-http - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Intermediate) - HTTP Multipart Demo war - UTF-8 - 2.1.0.RELEASE - 3.1.0.RELEASE - 1.2 + UTF-8 + 2.2.0.RC3 + 3.1.3.RELEASE + 1.2.2 1.3.2 - 1.2.16 + 1.2.17 + + + 2.2.1 + + org.springframework.integration spring-integration-http ${spring.integration.version} - - - - - org.codehaus.jackson jackson-mapper-asl - 1.9.2 + 1.9.10 compile true @@ -63,13 +63,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartRequestGateway.java b/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartRequestGateway.java index 874073ee..7d0b03e9 100644 --- a/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartRequestGateway.java +++ b/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartRequestGateway.java @@ -1,5 +1,17 @@ -/** - * +/* + * Copyright 2002-2012 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. + * 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.springframework.integration.samples.multipart; @@ -9,9 +21,10 @@ import org.springframework.http.HttpStatus; /** * @author ozhurakousky + * @author Gunnar Hillert * */ public interface MultipartRequestGateway { - public HttpStatus postMultipartRequest(Map multipartRequest); + HttpStatus postMultipartRequest(Map multipartRequest); } diff --git a/intermediate/pom.xml b/intermediate/pom.xml index 70b847ae..2a9798e3 100644 --- a/intermediate/pom.xml +++ b/intermediate/pom.xml @@ -5,10 +5,14 @@ 4.0.0 org.springframework.integration.samples intermediate-samples - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Spring Integration Samples - Intermediate pom + + 2.2.1 + + async-gateway errorhandling diff --git a/intermediate/rest-http/pom.xml b/intermediate/rest-http/pom.xml index 998841ad..eff582d3 100644 --- a/intermediate/rest-http/pom.xml +++ b/intermediate/rest-http/pom.xml @@ -1,15 +1,21 @@ - - 4.0.0 - org.springframework.integration.samples - rest-http - 2.1.0.BUILD-SNAPSHOT - war - Spring Integration Rest HTTP Path Usage Demo - Spring Integration Rest HTTP Path Usage Demo - - 2.1.0.RELEASE - 3.1.0.RELEASE - 3.1.0.RELEASE + + 4.0.0 + org.springframework.integration.samples + rest-http + 2.2.0.BUILD-SNAPSHOT + war + Spring Integration Rest HTTP Path Usage Demo + Spring Integration Rest HTTP Path Usage Demo + + + 2.2.1 + + + + 2.2.0.RC3 + 3.1.3.RELEASE + 3.1.3.RELEASE 1.2 1.3.2 1.2.16 @@ -17,116 +23,116 @@ 4.8.1 1.7 2.2 - - - - org.springframework.integration - spring-integration-http - ${spring.integration.version} - - - org.codehaus.jackson - jackson-mapper-asl - 1.8.0 - compile - - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - - - org.springframework - spring-webmvc - ${spring.version} - - - org.springframework - spring-oxm - ${spring.version} - - - org.springframework - spring-tx - ${spring.version} - - - org.springframework - spring-jdbc - ${spring.version} - - - org.springframework - spring-context - ${spring.version} - - - org.springframework - spring-aop - ${spring.version} - - + + + + org.springframework.integration + spring-integration-http + ${spring.integration.version} + + + org.codehaus.jackson + jackson-mapper-asl + 1.8.0 + compile + + + org.springframework.integration + spring-integration-core + ${spring.integration.version} + + + org.springframework + spring-webmvc + ${spring.version} + + + org.springframework + spring-oxm + ${spring.version} + + + org.springframework + spring-tx + ${spring.version} + + + org.springframework + spring-jdbc + ${spring.version} + + + org.springframework + spring-context + ${spring.version} + + + org.springframework + spring-aop + ${spring.version} + + org.springframework.security spring-security-core compile ${spring.security.version} - - - org.springframework.security - spring-security-config - compile - ${spring.security.version} - - - org.springframework.security - spring-security-web - compile - ${spring.security.version} - - - log4j - log4j - ${log4j.version} - - - org.jasypt - jasypt - ${jasypt.version} - runtime - - - cglib - cglib - ${cglib.version} - runtime - - - - javax.servlet - servlet-api - ${javax.servlet.version} - provided - - - org.springframework - spring-test - ${spring.version} - test - - - org.springframework - spring-tx - - - - - junit - junit - ${junit.version} - test - - - + + + org.springframework.security + spring-security-config + compile + ${spring.security.version} + + + org.springframework.security + spring-security-web + compile + ${spring.security.version} + + + log4j + log4j + ${log4j.version} + + + org.jasypt + jasypt + ${jasypt.version} + runtime + + + cglib + cglib + ${cglib.version} + runtime + + + + javax.servlet + servlet-api + ${javax.servlet.version} + provided + + + org.springframework + spring-test + ${spring.version} + test + + + org.springframework + spring-tx + + + + + junit + junit + ${junit.version} + test + + + org.apache.maven.plugins @@ -136,35 +142,38 @@ 1.6 -Xlint:all true - false + true
org.apache.maven.plugins maven-antrun-plugin - 1.6 - - - clean - - - Copying jaxb.index to classes folder - - - - - + 1.6 + + + clean + + + Copying jaxb.index to classes folder + + + + + - - - clean - - run - - - - + + + clean + + run + + + + @@ -174,4 +183,4 @@ https://repo.springsource.org/libs-milestone - \ No newline at end of file + diff --git a/intermediate/retry-and-more/pom.xml b/intermediate/retry-and-more/pom.xml index 425b9976..be6dd3e6 100644 --- a/intermediate/retry-and-more/pom.xml +++ b/intermediate/retry-and-more/pom.xml @@ -4,14 +4,19 @@ 4.0.0 org.springframework.integration.samples retry-and-more - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Intermediate) - Retry and More jar + + + 2.2.1 + + - UTF-8 - 3.1.2.RELEASE - 2.2.0.RC1 - 1.2.16 + UTF-8 + 3.1.3.RELEASE + 2.2.0.RC3 + 1.2.17 4.10 @@ -41,11 +46,11 @@ log4j ${log4j.version} - - org.mockito - mockito-all - 1.8.5 - + + org.mockito + mockito-all + 1.8.5 + org.springframework @@ -63,30 +68,30 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.5 1.5 -Xlint:all true - false + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + ${java.main.class} - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - ${java.main.class} - - - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/libs-milestone - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/libs-milestone + + diff --git a/intermediate/stored-procedures-derby/pom.xml b/intermediate/stored-procedures-derby/pom.xml index 60fba889..693dd784 100644 --- a/intermediate/stored-procedures-derby/pom.xml +++ b/intermediate/stored-procedures-derby/pom.xml @@ -4,16 +4,20 @@ org.springframework.integration.samples derby-stored-procedures - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar Samples (Intermediate) - Stored Procedures Derby http://www.springsource.org/spring-integration + + 2.2.1 + + UTF-8 - 2.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -29,7 +33,7 @@ maven-eclipse-plugin - 2.8 + 2.9 org.springframework.ide.eclipse.core.springnature @@ -44,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 @@ -56,7 +60,7 @@ org.codehaus.mojo exec-maven-plugin - 1.2 + 1.2.1 org.springframework.integration.Main @@ -100,7 +104,7 @@ org.apache.derby derby - 10.8.2.2 + 10.9.1.0
diff --git a/intermediate/stored-procedures-ms/pom.xml b/intermediate/stored-procedures-ms/pom.xml index bc2a61b4..ac3845aa 100644 --- a/intermediate/stored-procedures-ms/pom.xml +++ b/intermediate/stored-procedures-ms/pom.xml @@ -17,7 +17,7 @@ UTF-8 - 2.2.0.RC2 + 2.2.0.RC3 1.2.17 4.10 diff --git a/intermediate/stored-procedures-oracle/pom.xml b/intermediate/stored-procedures-oracle/pom.xml index f581928e..54e700e4 100644 --- a/intermediate/stored-procedures-oracle/pom.xml +++ b/intermediate/stored-procedures-oracle/pom.xml @@ -4,16 +4,20 @@ org.springframework.integration.samples oracle-stored-procedures - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT jar Samples (Intermediate) - Stored Procedures Oracle http://www.springsource.org/spring-integration + + 2.2.1 + + UTF-8 - 2.1.0.RELEASE - 1.2.16 + 2.2.0.RC3 + 1.2.17 4.10 @@ -44,7 +48,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 diff --git a/intermediate/stored-procedures-postgresql/pom.xml b/intermediate/stored-procedures-postgresql/pom.xml index 69273e37..3c8951ea 100644 --- a/intermediate/stored-procedures-postgresql/pom.xml +++ b/intermediate/stored-procedures-postgresql/pom.xml @@ -16,7 +16,7 @@ UTF-8 - 2.2.0.RC2 + 2.2.0.RC3 1.2.17 4.10 diff --git a/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/Main.java b/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/Main.java index 0a299579..a0503f98 100644 --- a/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/Main.java +++ b/intermediate/stored-procedures-postgresql/src/main/java/org/springframework/integration/Main.java @@ -33,7 +33,7 @@ import org.springframework.integration.service.CoffeeService; * @since 2.2 * */ -public final class Main { +public class Main { private static final Logger LOGGER = Logger.getLogger(Main.class); diff --git a/intermediate/stored-procedures-postgresql/src/main/resources/META-INF/spring/integration/spring-integration-context.xml b/intermediate/stored-procedures-postgresql/src/main/resources/META-INF/spring/integration/spring-integration-context.xml index e934ff8f..7456ab4a 100644 --- a/intermediate/stored-procedures-postgresql/src/main/resources/META-INF/spring/integration/spring-integration-context.xml +++ b/intermediate/stored-procedures-postgresql/src/main/resources/META-INF/spring/integration/spring-integration-context.xml @@ -7,7 +7,7 @@ xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd - http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd + http://www.springframework.org/schema/integration/jdbc file:///Users/hillert/dev/git/spring-integration/spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc-2.2.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> @@ -49,7 +49,16 @@ row-mapper="org.springframework.integration.support.CoffeBeverageMapper" /> + + + + + + + + diff --git a/intermediate/tcp-client-server-multiplex/pom.xml b/intermediate/tcp-client-server-multiplex/pom.xml index a967d31d..3255a97a 100644 --- a/intermediate/tcp-client-server-multiplex/pom.xml +++ b/intermediate/tcp-client-server-multiplex/pom.xml @@ -4,14 +4,19 @@ 4.0.0 org.springframework.integration.samples tcp-client-server-multiplex - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Intermediate) - TCP Client Server Multiplexing Sample jar + + + 2.2.1 + + - UTF-8 - 3.1.0.RELEASE - 2.1.0.RELEASE - 1.2.16 + UTF-8 + 3.1.3.RELEASE + 2.2.0.RC3 + 1.2.17 4.10 @@ -48,13 +53,13 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true diff --git a/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java b/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java index e42aaa22..d34d467d 100644 --- a/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java +++ b/intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2012 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. @@ -17,11 +17,12 @@ package org.springframework.integration.samples.tcpclientserver; /** * @author Gary Russell + * @author Gunnar Hillert * @since 2.1 * */ public interface SimpleGateway { - public String send(String text); + String send(String text); } \ No newline at end of file diff --git a/intermediate/travel/pom.xml b/intermediate/travel/pom.xml index bfdd4ff7..4a17bbfa 100644 --- a/intermediate/travel/pom.xml +++ b/intermediate/travel/pom.xml @@ -4,13 +4,18 @@ org.springframework.integration.samples travel Samples (Intermediate) - Travel Services - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT + + + 2.2.1 + + UTF-8 - 2.2.0.RC2 + 2.2.0.RC3 1.2.17 4.10 - 3.1.2.RELEASE + 3.1.3.RELEASE org.springframework.integration.samples.travel.Main @@ -58,7 +63,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 1.6 1.6 diff --git a/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java b/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java index 1e9637f9..96510c3e 100644 --- a/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java +++ b/intermediate/travel/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java @@ -25,8 +25,8 @@ package org.springframework.integration.samples.travel; */ public interface TravelGateway { - public String getWeatherByCity(City city); + String getWeatherByCity(City city); - public String getTrafficByCity(City city); + String getTrafficByCity(City city); } diff --git a/intermediate/tx-synch/pom.xml b/intermediate/tx-synch/pom.xml index 9289c481..b1e02760 100755 --- a/intermediate/tx-synch/pom.xml +++ b/intermediate/tx-synch/pom.xml @@ -4,14 +4,19 @@ 4.0.0 org.springframework.integration.samples tx-synch - 2.1.0.BUILD-SNAPSHOT + 2.2.0.BUILD-SNAPSHOT Samples (Intermediate) - Transaction Synchronization jar + + + 2.2.1 + + - UTF-8 - 3.1.2.RELEASE - 2.2.0.RC1 - 1.2.16 + UTF-8 + 3.1.3.RELEASE + 2.2.0.RC3 + 1.2.17 4.10 @@ -42,20 +47,20 @@ ${spring.framework.version} - com.h2database - h2 - 1.3.166 + com.h2database + h2 + 1.3.166 log4j log4j ${log4j.version} - - org.mockito - mockito-all - 1.8.5 - + + org.mockito + mockito-all + 1.8.5 + org.springframework @@ -73,30 +78,30 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 2.5.1 - 1.5 - 1.5 + 1.6 + 1.6 -Xlint:all true - false + true + + + + org.codehaus.mojo + exec-maven-plugin + 1.2 + + ${java.main.class} - - org.codehaus.mojo - exec-maven-plugin - 1.2 - - ${java.main.class} - - - - - repo.springsource.org.milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/libs-snapshot - - + + + repo.springsource.org.milestone + Spring Framework Maven Milestone Repository + https://repo.springsource.org/libs-snapshot + + diff --git a/pom.xml b/pom.xml index 4e99a819..e49a29ea 100644 --- a/pom.xml +++ b/pom.xml @@ -10,6 +10,10 @@ http://www.springsource.org/spring-integration pom + + 2.2.1 + + basic intermediate