From 21a7a538bfe4ddcac0a15ac842cb597ef213a78c Mon Sep 17 00:00:00 2001 From: Thomas Risberg Date: Thu, 7 Apr 2011 17:19:07 -0400 Subject: [PATCH] beginning of cross-store docs --- src/docbkx/reference/cross-store.xml | 46 +++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/src/docbkx/reference/cross-store.xml b/src/docbkx/reference/cross-store.xml index cc96c502a..46ea0f8e1 100644 --- a/src/docbkx/reference/cross-store.xml +++ b/src/docbkx/reference/cross-store.xml @@ -1,17 +1,53 @@ +"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> Cross Store support - Cross Store support introduction. - + Sometimes you need to store data in multiple data stores and these + data stores can be of different types. One might be relational while the + other a document store. For this use case we have created a separate module + in the MongoDB support that handles what we call cross-store support. The + current implemenatation is based on JPA as the driver for the relational + database and we allow select fields in the Entities to be stored in a Mongo + database. In addition to allowing you to store your data in two stores we + also coordinate persistence operations for the non-transactional MongoDB + store with the transaction life-cycle for the relational database.
Cross Store Configuration - Cross Store... - + Assuming that you have a working JPA application and would like to + add some cross-store persistence for MongoDB. What do you have to add to + your configuration? + First of all you need to add a dependency on the + spring-data-mongodb-cross-store module. Using Maven + this is done by adding a dependency to your pom: + + + Example Maven pom.xml + + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + +... + + <!-- Spring Data --> + <dependency> + <groupId>org.springframework.data</groupId> + <artifactId>spring-data-mongodb-cross-store</artifactId> + <version>${spring.data.mongo.version}</version> + </dependency> + + +... + +</project> + + + +