Author: mfranklin
Date: Wed Jan 16 02:27:03 2013
New Revision: 1433801
URL: http://svn.apache.org/viewvc?rev=1433801&view=rev
Log:
Added initial MongoDB documentation
Added:
rave/site/trunk/content/documentation/mongo-db.mdtext (with props)
Modified:
rave/site/trunk/content/documentation/configure-database.mdtext
rave/site/trunk/content/documentation/index.mdtext
Modified: rave/site/trunk/content/documentation/configure-database.mdtext
URL:
http://svn.apache.org/viewvc/rave/site/trunk/content/documentation/configure-database.mdtext?rev=1433801&r1=1433800&r2=1433801&view=diff
==============================================================================
--- rave/site/trunk/content/documentation/configure-database.mdtext (original)
+++ rave/site/trunk/content/documentation/configure-database.mdtext Wed Jan 16
02:27:03 2013
@@ -1,4 +1,4 @@
-Title: Configure the databases
+Title: Configure the SQL databases
Notice: Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -18,7 +18,8 @@ Notice: Licensed to the Apache Softwa
## Default setup
In the default setup, Apache Rave uses a file-based [H2 database][1]. Apache
Rave and Apache Shindig run in the same Apache Tomcat server as
-separate web applications but share data, so we use H2's [Automatic Mixed
Mode][2].
+separate web applications but share data, so we use H2's [Automatic Mixed
Mode][2].
+
### Filling the default database
All schemes are generated using JPA annotations. The H2 database is populated
with low level SQL queries using the DataSourcePopulator which is configured as
Spring bean. These queries are not guaranteed to work for a different database.
Modified: rave/site/trunk/content/documentation/index.mdtext
URL:
http://svn.apache.org/viewvc/rave/site/trunk/content/documentation/index.mdtext?rev=1433801&r1=1433800&r2=1433801&view=diff
==============================================================================
--- rave/site/trunk/content/documentation/index.mdtext (original)
+++ rave/site/trunk/content/documentation/index.mdtext Wed Jan 16 02:27:03 2013
@@ -20,7 +20,8 @@ Notice: Licensed to the Apache Softwa
- [Installing](installing.html)
- [Host configuration](host-configuration.html)
- [SSL configuring](configure-ssl.html)
- - [Database configuration](configure-database.html)
+ - [SQL Database configuration](configure-database.html)
+ - [Using MongoDB](mongo-db.html)
- [Locked Domain configuration](configure-locked-domain.html)
- [Application containers](application-containers.html)
Added: rave/site/trunk/content/documentation/mongo-db.mdtext
URL:
http://svn.apache.org/viewvc/rave/site/trunk/content/documentation/mongo-db.mdtext?rev=1433801&view=auto
==============================================================================
--- rave/site/trunk/content/documentation/mongo-db.mdtext (added)
+++ rave/site/trunk/content/documentation/mongo-db.mdtext Wed Jan 16 02:27:03
2013
@@ -0,0 +1,96 @@
+Title: MongoDB Support
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+As of 0.19, Rave has a [MongoDB][4] module that provides implementations for
all of Rave's repository interfaces; thus providing support for MongoDB.
+
+#Using the MongoDB for Persistence
+JPA remains the primary supported data access method in the rave-portal &
rave-portal-resources projects; but can be easily replaced with MongoDB using
the following techniques:
+
+##Build from source
+
+To build a MongoDB version of the demo binaries follow these steps:
+
+1. Obtain the source from the [downloads][0] or from [Source Control][1]
+2. From the project root directory execute: `mvn install -Pmongodb`
+
+The rave-portal, rave-portal-resources & rave-shindig wars created by this
process contain everything needed to run Rave with MongoDB persistence. See
[configuring MongoDB][3] for information on how to set the database properties.
+
+##Custom Rave Extension
+
+In a custom build that depends on rave-jpa directly, the only thing that needs
to be done is to replace the rave-jpa dependency with rave-mongo.
+
+If the custom application depends on JPA indirectly, via a dependency on
rave-portal-dependencies add an exclusion of rave-jpa to
rave-portal-dependencies as follows:
+
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-portal-dependencies</artifactId>
+ <type>pom</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-jpa</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-mongodb</artifactId>
+ </dependency>
+
+Configure the properties files for portal & shindig as described in
[configuring MongoDB][3]
+
+##Demo Binaries
+
+To replace the JPA implementation with Mongo in an extracted demo binary or
other packaged Rave instance, take the following steps. This method is **NOT**
recommended for production deployments. The preferred method is to modify a
custom extension, or build, of Rave to as noted above:
+
+1. Start the demo binary as normal to allow it to extract the war archives
+2. Remove rave-jpa.jar from webapps/portal/WEB-INF/lib &
webapps/ROOT/WEB-INF/lib
+3. Configure the properties files located in webapps/portal/WEB-INF/classes &
webapps/ROOT/WEB-INF/classes per [configuring MongoDB][3]
+
+
+<a name="configure" />
+##Configuring MongoDB
+Both portal.properties & rave.shindig.properties have entries for connecting
to MongoDB.
+
+ mongo.host=localhost
+ mongo.port=27017
+ mongo.database=rave
+ mongo.username=
+ mongo.password=
+
+#Architecture
+
+Rave leverages Spring Data MongoDB to simplify interactions with the MongoDB
database using the [MongoOperations][2] model serialization pattern. One the
the primary benefits of using MongoDB for Rave persistence is that entire
object hierarchies can be deserialized from the database in a single call. For
example, rather than making a call to the database for a Page object, its
Regions and RegionWidgets, we can now just deserialize the entire page in one
call. Since Rave currently has repositories for many of the sub-components of
a hierarchy, we needed a way to access the same object type from multiple
repositories. This lead to the following component architecture:
+
+ |_ Rave MongoDB repository implementations
+ |
+ |_ MongoModelOperations implementations
+ |
+ |_ Spring MongoOperations
+ |
+ |_ Mongo Driver
+
+As with any Rave component, MongoModelOperations instances can be wired in by
interface or class name to custom components.
+
+*NOTE: Since some simple Rave objects such as PortalPreference & PageLayout
instances don't have sub-component repositories, not every Rave model object
has a corresponding MongoModelOperations instance.*
+
+[0]: /downloads.html
+[1]: /source.html
+[2]:
http://static.springsource.org/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/core/MongoOperations.html
+[3]: #configure
+[4]: http://www.mongodb.org
\ No newline at end of file
Propchange: rave/site/trunk/content/documentation/mongo-db.mdtext
------------------------------------------------------------------------------
svn:eol-style = native