Skip to content

Commit 21a7a53

Browse files
author
Thomas Risberg
committed
beginning of cross-store docs
1 parent dd2e1ac commit 21a7a53

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

src/docbkx/reference/cross-store.xml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,53 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3-
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
3+
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
44
<chapter id="mongo.cross.store">
55
<title>Cross Store support</title>
66

7-
<para>Cross Store support introduction.
8-
</para>
7+
<para>Sometimes you need to store data in multiple data stores and these
8+
data stores can be of different types. One might be relational while the
9+
other a document store. For this use case we have created a separate module
10+
in the MongoDB support that handles what we call cross-store support. The
11+
current implemenatation is based on JPA as the driver for the relational
12+
database and we allow select fields in the Entities to be stored in a Mongo
13+
database. In addition to allowing you to store your data in two stores we
14+
also coordinate persistence operations for the non-transactional MongoDB
15+
store with the transaction life-cycle for the relational database.</para>
916

1017
<section id="mongodb:croos-store-configuration">
1118
<title>Cross Store Configuration</title>
1219

13-
<para>Cross Store...
14-
</para>
20+
<para>Assuming that you have a working JPA application and would like to
21+
add some cross-store persistence for MongoDB. What do you have to add to
22+
your configuration?</para>
1523

24+
<para>First of all you need to add a dependency on the
25+
<filename>spring-data-mongodb-cross-store</filename> module. Using Maven
26+
this is done by adding a dependency to your pom:</para>
27+
28+
<example>
29+
<title>Example Maven pom.xml</title>
30+
31+
<programlisting language="xml">&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
32+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
33+
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
34+
35+
...
36+
37+
&lt;!-- Spring Data --&gt;
38+
&lt;dependency&gt;
39+
&lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
40+
&lt;artifactId&gt;spring-data-mongodb-cross-store&lt;/artifactId&gt;
41+
&lt;version&gt;${spring.data.mongo.version}&lt;/version&gt;
42+
&lt;/dependency&gt;
43+
44+
45+
...
46+
47+
&lt;/project&gt;
48+
</programlisting>
49+
</example>
50+
51+
<para></para>
1652
</section>
1753
</chapter>

0 commit comments

Comments
 (0)