INTSAMPLES-89 - Upgrade to Spring Integration 2.2 RC3
* Test samples * Polish documentation * Polish code For reference see: https://jira.springsource.org/browse/INTSAMPLES-89
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user