From 259ab51fe16fd3292536d26e5c0047b886c1761d Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Thu, 25 Aug 2011 16:53:53 -0400 Subject: [PATCH 1/3] INT-2080 work in progress for Mongo documentation --- docs/src/reference/docbook/index.xml | 18 ++-- docs/src/reference/docbook/mongodb.xml | 109 +++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 docs/src/reference/docbook/mongodb.xml diff --git a/docs/src/reference/docbook/index.xml b/docs/src/reference/docbook/index.xml index 9306eb97b0..cdbe7e9041 100644 --- a/docs/src/reference/docbook/index.xml +++ b/docs/src/reference/docbook/index.xml @@ -126,16 +126,18 @@ + - - + + - - - - - - + + + + + + + diff --git a/docs/src/reference/docbook/mongodb.xml b/docs/src/reference/docbook/mongodb.xml new file mode 100644 index 0000000000..140fe85351 --- /dev/null +++ b/docs/src/reference/docbook/mongodb.xml @@ -0,0 +1,109 @@ + + + MongoDb Support + + Since version 2.1 Spring Integration introduces support for MongoDb database - "high-performance, open source, document-oriented database" + This support comes in the form of MongoDb-based MessageStore. + +
+ Introduction + + To download, install and run MongoDb please refer to MongoDb documentation + +
+ +
+ Connecting to MongoDb + + To begin interacting with MongoDb you first need to connect to it. Spring Integration uses support provided by another Spring project - + Spring Data MongoDB which uses an all familiar Spring's ConnectionFactory. + abstraction to simplify integration with MongoDB Client API. + + MongoDbFactory + + + To connect to MongoDb you would use one of the implementations of MongoDbFactory interface + + + + + Example below shows how to create SimpleMongoDbFactory + + In Java: + + + + Or as Spring configuration:: + + + + +]]> + + + + As you can see SimpleMongoDbFactory takes two arguments; A connection object Mongo and String specifying the name of the database. +If you need to specify properties such as host, port etc, you can pass those using one of the constructors provided by Mongo. +For more information on how to configure please refer to Spring-Data-Document reference documentation. + + + +
+ +
+ MongoDb Message Store + + + As described in the EIP MessageStore allows you to persist Messages which can be very useful when dealing + with components that have capability to buffer messages (QueueChannel, Aggregator, Resequencer) if reliability is a concern as well as patterns such as + ClaimCheck + + + + Spring Integration MongoDb module provides MongoDbMessageStore which is the implementation of both MessageStore strategy + (mainly used by QueueChannel and ClaimCheck patterns) as well as MessageGroupStore strategy + (mainly used by Aggregator and Resequencer patterns) + + + + + + + + + + + +]]> + + + Above is a sample RedisMessageStore configuration as well as its usage (QueueChannel and Aggregator). As you can see it is a simple + bean configuration injected with RedisConnectionFactory via constructor. + + + By default RedisMessageStore will use Java serialization to serialize the Message, however if you want to use different serialization technique (e.g., JSON) + you can provide your own serializer via valueSerializer property of RedisMessageStore. +
+ +
\ No newline at end of file From 7813e61100eb767bb1a920b9a538bbce3c01acda Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Fri, 26 Aug 2011 09:50:39 -0400 Subject: [PATCH 2/3] INT-2080 added initial Mongo support documentation --- docs/src/reference/docbook/mongodb.xml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/src/reference/docbook/mongodb.xml b/docs/src/reference/docbook/mongodb.xml index 140fe85351..c51123d2e7 100644 --- a/docs/src/reference/docbook/mongodb.xml +++ b/docs/src/reference/docbook/mongodb.xml @@ -18,7 +18,7 @@ To begin interacting with MongoDb you first need to connect to it. Spring Integration uses support provided by another Spring project - Spring Data MongoDB which uses an all familiar Spring's ConnectionFactory. - abstraction to simplify integration with MongoDB Client API. + abstraction to simplify integration with MongoDB Client API. MongoDbFactory @@ -63,8 +63,9 @@ As you can see SimpleMongoDbFactory takes two arguments; A connection object Mongo and String specifying the name of the database. -If you need to specify properties such as host, port etc, you can pass those using one of the constructors provided by Mongo. -For more information on how to configure please refer to Spring-Data-Document reference documentation. +If you need to specify properties such as host, port etc, you can pass those using one of the constructors provided by Mongo. +For more information on how to configure please refer to +Spring-Data-Document reference documentation. @@ -86,24 +87,21 @@ For more information on how to configure please refer to - + + - + ]]> + message-store="mongoDbMessageStore"/>]]> - Above is a sample RedisMessageStore configuration as well as its usage (QueueChannel and Aggregator). As you can see it is a simple - bean configuration injected with RedisConnectionFactory via constructor. + Above is a sample MongoDbMessageStore configuration as well as its usage (QueueChannel and Aggregator). As you can see it is a simple + bean configuration injected with SimpleMongoDbFactory via constructor. - - By default RedisMessageStore will use Java serialization to serialize the Message, however if you want to use different serialization technique (e.g., JSON) - you can provide your own serializer via valueSerializer property of RedisMessageStore. \ No newline at end of file From be817cf937cfce94957198480bc9137084798862 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 31 Aug 2011 15:26:47 -0400 Subject: [PATCH 3/3] polishing --- docs/src/reference/docbook/mongodb.xml | 109 +++++++++++++------------ docs/src/reference/docbook/redis.xml | 7 +- 2 files changed, 63 insertions(+), 53 deletions(-) diff --git a/docs/src/reference/docbook/mongodb.xml b/docs/src/reference/docbook/mongodb.xml index c51123d2e7..10ffdb6f16 100644 --- a/docs/src/reference/docbook/mongodb.xml +++ b/docs/src/reference/docbook/mongodb.xml @@ -1,36 +1,40 @@ + MongoDb Support + - Since version 2.1 Spring Integration introduces support for MongoDb database - "high-performance, open source, document-oriented database" - This support comes in the form of MongoDb-based MessageStore. + As of version 2.1 Spring Integration introduces support for MongoDB: + a "high-performance, open source, document-oriented database". + This support comes in the form of a MongoDB-based MessageStore. +
Introduction - To download, install and run MongoDb please refer to MongoDb documentation + To download, install, and run MongoDB please refer to the MongoDB documentation.
- +
Connecting to MongoDb - - To begin interacting with MongoDb you first need to connect to it. Spring Integration uses support provided by another Spring project - - Spring Data MongoDB which uses an all familiar Spring's ConnectionFactory. - abstraction to simplify integration with MongoDB Client API. - + + To begin interacting with MongoDB you first need to connect to it. Spring Integration builds on the support provided by another + Spring project, Spring Data MongoDB, which provides a factory + class called MongoDbFactory that simplifies integration with the MongoDB Client API. + MongoDbFactory - + - To connect to MongoDb you would use one of the implementations of MongoDbFactory interface + To connect to MongoDB you can use an implementation of the MongoDbFactory interface: - - Example below shows how to create SimpleMongoDbFactory - + + The example below shows SimpleMongoDbFactory, the out-of-the-box implementation: + In Java: - - Or as Spring configuration:: + + Or in Spring's XML configuration: - - - + + + + ]]> - - - As you can see SimpleMongoDbFactory takes two arguments; A connection object Mongo and String specifying the name of the database. -If you need to specify properties such as host, port etc, you can pass those using one of the constructors provided by Mongo. -For more information on how to configure please refer to -Spring-Data-Document reference documentation. + + As you can see SimpleMongoDbFactory takes two arguments: 1) a Mongo instance and + 2) a String specifying the name of the database. If you need to configure properties such as host, port, etc, + you can pass those using one of the constructors provided by the underlying Mongo class. + For more information on how to configure MongoDB, please refer to the +Spring-Data-Document reference. -
- +
- MongoDb Message Store + MongoDB Message Store + + + As described in EIP, a Message Store allows you to persist Messages. + This can be very useful when dealing with components that have a capability to buffer messages + (QueueChannel, Aggregator, Resequencer, etc.) if reliability is a concern. + In Spring Integration, the MessageStore strategy also provides the foundation for the + ClaimCheck pattern, which is described in EIP as well. + - - As described in the EIP MessageStore allows you to persist Messages which can be very useful when dealing - with components that have capability to buffer messages (QueueChannel, Aggregator, Resequencer) if reliability is a concern as well as patterns such as - ClaimCheck + + Spring Integration's MongoDB module provides the MongoDbMessageStore which is an implementation of both + the MessageStore strategy (mainly used by the QueueChannel and ClaimCheck + patterns) and the MessageGroupStore strategy (mainly used by the Aggregator and + Resequencer patterns). - - - Spring Integration MongoDb module provides MongoDbMessageStore which is the implementation of both MessageStore strategy - (mainly used by QueueChannel and ClaimCheck patterns) as well as MessageGroupStore strategy - (mainly used by Aggregator and Resequencer patterns) - - - - - + + + + @@ -97,11 +104,13 @@ For more information on how to configure please refer to ]]> - - - Above is a sample MongoDbMessageStore configuration as well as its usage (QueueChannel and Aggregator). As you can see it is a simple - bean configuration injected with SimpleMongoDbFactory via constructor. - + + + + Above is a sample MongoDbMessageStore configuration that shows its usage by a QueueChannel + and an Aggregator. As you can see it is a simple bean configuration, and it expects a + MongoDbFactory as a constructor argument. +
\ No newline at end of file diff --git a/docs/src/reference/docbook/redis.xml b/docs/src/reference/docbook/redis.xml index b6508e8b72..8022ef84a7 100644 --- a/docs/src/reference/docbook/redis.xml +++ b/docs/src/reference/docbook/redis.xml @@ -186,13 +186,14 @@ rt.setConnectionFactory(redisConnectionFactory);]]> This can be very useful when dealing with components that have a capability to buffer messages (QueueChannel, Aggregator, Resequencer, etc.) if reliability is a concern. In Spring Integration, the MessageStore strategy also provides the foundation for the - ClaimCheck pattern, described in EIP as well. + ClaimCheck pattern, which is described in EIP as well. Spring Integration's Redis module provides the RedisMessageStore which is an implementation of both the - MessageStore strategy (mainly used by the QueueChannel and ClaimCheck patterns) and - the MessageGroupStore strategy (mainly used by Aggregator and Resequencer patterns). + the MessageStore strategy (mainly used by the QueueChannel and ClaimCheck + patterns) and the MessageGroupStore strategy (mainly used by the Aggregator and + Resequencer patterns).