Author: buildbot
Date: Wed Jan 16 02:27:08 2013
New Revision: 846783
Log:
Staging update by buildbot for rave
Added:
websites/staging/rave/trunk/content/documentation/mongo-db.html
Modified:
websites/staging/rave/trunk/content/ (props changed)
websites/staging/rave/trunk/content/documentation/configure-database.html
websites/staging/rave/trunk/content/documentation/index.html
Propchange: websites/staging/rave/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Jan 16 02:27:08 2013
@@ -1 +1 @@
-1431500
+1433801
Modified:
websites/staging/rave/trunk/content/documentation/configure-database.html
==============================================================================
--- websites/staging/rave/trunk/content/documentation/configure-database.html
(original)
+++ websites/staging/rave/trunk/content/documentation/configure-database.html
Wed Jan 16 02:27:08 2013
@@ -24,7 +24,7 @@
<link rel="stylesheet" href="//www.google.com/cse/style/look/default.css"/>
<link href="/css/bootstrap.min.css" rel="stylesheet"/>
<link href="/css/rave.css" rel="stylesheet"/>
- <title>Configure the databases</title>
+ <title>Configure the SQL databases</title>
</head>
<body>
@@ -78,7 +78,7 @@
<header class="row page-header">
<div class="span9">
<img src="/images/RAVE-logo_main-logo.png" class="logo" id="logo"
alt="Apache Rave™" />
- <h1 class="title">Configure the databases</h1>
+ <h1 class="title">Configure the SQL databases</h1>
</div>
<div class="span3">
<div id="cse-search-form" class="pull-right">Loading <!-- Placeholder
for Google Search Form --></div>
@@ -88,7 +88,8 @@
<article class="span12">
<h2 id="default-setup">Default setup</h2>
<p>In the default setup, Apache Rave uses a file-based <a
href="http://www.h2database.com/">H2 database</a>. Apache Rave and Apache
Shindig run in the same Apache Tomcat server as
-separate web applications but share data, so we use H2's <a
href="http://www.h2database.com/html/features.html#auto_mixed_mode">Automatic
Mixed Mode</a>.</p>
+separate web applications but share data, so we use H2's <a
href="http://www.h2database.com/html/features.html#auto_mixed_mode">Automatic
Mixed Mode</a>.<br />
+</p>
<h3 id="filling-the-default-database">Filling the default database</h3>
<p>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.</p>
<div class="codehilite"><pre><span class="nt"><bean</span> <span
class="na">id=</span><span class="s">"dataSourcePopulator"</span>
<span class="na">class=</span><span
class="s">"org.apache.rave.jdbc.util.DataSourcePopulator"</span><span
class="nt">></span>
Modified: websites/staging/rave/trunk/content/documentation/index.html
==============================================================================
--- websites/staging/rave/trunk/content/documentation/index.html (original)
+++ websites/staging/rave/trunk/content/documentation/index.html Wed Jan 16
02:27:08 2013
@@ -91,7 +91,8 @@
<li><a href="installing.html">Installing</a><ul>
<li><a href="host-configuration.html">Host configuration</a></li>
<li><a href="configure-ssl.html">SSL configuring</a></li>
-<li><a href="configure-database.html">Database configuration</a></li>
+<li><a href="configure-database.html">SQL Database configuration</a></li>
+<li><a href="mongo-db.html">Using MongoDB</a></li>
<li><a href="configure-locked-domain.html">Locked Domain configuration</a></li>
<li><a href="application-containers.html">Application containers</a></li>
</ul>
Added: websites/staging/rave/trunk/content/documentation/mongo-db.html
==============================================================================
--- websites/staging/rave/trunk/content/documentation/mongo-db.html (added)
+++ websites/staging/rave/trunk/content/documentation/mongo-db.html Wed Jan 16
02:27:08 2013
@@ -0,0 +1,184 @@
+<!doctype html>
+<html>
+<head>
+ <meta charset="UTF-8"/>
+<!--
+
+ 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.
+-->
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" >
+ <link rel="shortcut icon" href="/images/RAVE-favicon.ico"
type="image/x-icon"/>
+ <link rel="stylesheet" href="//www.google.com/cse/style/look/default.css"/>
+ <link href="/css/bootstrap.min.css" rel="stylesheet"/>
+ <link href="/css/rave.css" rel="stylesheet"/>
+ <title>MongoDB Support</title>
+</head>
+
+<body>
+
+ <div class="navbar navbar-inverse navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse"
data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="index.html">
+ Apache Rave™
+ </a>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown">General <b
class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="/index.html">About</a></li><li><a
href="/documentation/index.html">Documentation</a></li><li><a
href="/downloads.html">Downloads</a></li>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown">Community <b
class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="/get-involved.html">Get Involved</a></li><li><a
href="/mailing-lists.html">Mailing Lists</a></li><li><a
href="/people.html">People</a></li><li><a
href="http://wiki.apache.org/rave">Wiki</a></li>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown">Development <b
class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="/source.html">Getting Started</a></li><li><a
href="/ide-settings-and-debugging.html">IDE Settings &
Debugging</a></li><li><a href="/release-management.html">Release
Management</a></li><li><a href="/issue-management.html">Issue
Tracker</a></li><li><a
href="https://builds.apache.org/hudson/view/M-R/view/Rave/">Continuous
Integration</a></li><li><a
href="https://analysis.apache.org/dashboard/index/58996">Sonar
Dashboard</a></li><li><a href="edit-website.html">Website</a></li>
+ </ul>
+ </li>
+
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown">ASF <b
class="caret"></b></a>
+ <ul class="dropdown-menu">
+ <li><a href="http://www.apache.org">Apache Software
Foundation</a></li><li><a
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
href="http://www.apache.org/foundation/sponsorship.html">Become a
Sponsor</a></li><li><a href="http://www.apache.org/security/">Security</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div><!-- /.nav-collapse -->
+ </div><!-- /.container -->
+ </div><!-- /.navbar-inner -->
+ </div>
+ <div id="main" role="main" class="container">
+ <header class="row page-header">
+ <div class="span9">
+ <img src="/images/RAVE-logo_main-logo.png" class="logo" id="logo"
alt="Apache Rave™" />
+ <h1 class="title">MongoDB Support</h1>
+ </div>
+ <div class="span3">
+ <div id="cse-search-form" class="pull-right">Loading <!-- Placeholder
for Google Search Form --></div>
+ </div>
+ </header>
+ <section id="content" class="row">
+ <article class="span12">
+ <p>As of 0.19, Rave has a <a
href="http://www.mongodb.org">MongoDB</a> module that provides implementations
for all of Rave's repository interfaces; thus providing support for MongoDB.<br
/>
+</p>
+<h1 id="using-the-mongodb-for-persistence">Using the MongoDB for
Persistence</h1>
+<p>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:</p>
+<h2 id="build-from-source">Build from source</h2>
+<p>To build a MongoDB version of the demo binaries follow these steps:</p>
+<ol>
+<li>Obtain the source from the <a href="/downloads.html">downloads</a> or from
<a href="/source.html">Source Control</a></li>
+<li>From the project root directory execute: <code>mvn install
-Pmongodb</code></li>
+</ol>
+<p>The rave-portal, rave-portal-resources & rave-shindig wars created by
this process contain everything needed to run Rave with MongoDB persistence.
See <a href="#configure">configuring MongoDB</a> for information on how to set
the database properties.</p>
+<h2 id="custom-rave-extension">Custom Rave Extension</h2>
+<p>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.</p>
+<p>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:</p>
+<div class="codehilite"><pre> <span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.rave<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>rave-portal-dependencies<span
class="nt"></artifactId></span>
+ <span class="nt"><type></span>pom<span
class="nt"></type></span>
+ <span class="nt"><exclusions></span>
+ <span class="nt"><exclusion></span>
+ <span class="nt"><groupId></span>org.apache.rave<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>rave-jpa<span
class="nt"></artifactId></span>
+ <span class="nt"></exclusion></span>
+ <span class="nt"></exclusions></span>
+ <span class="nt"></dependency></span>
+ <span class="nt"><dependency></span>
+ <span class="nt"><groupId></span>org.apache.rave<span
class="nt"></groupId></span>
+ <span class="nt"><artifactId></span>rave-mongodb<span
class="nt"></artifactId></span>
+ <span class="nt"></dependency></span>
+</pre></div>
+
+
+<p>Configure the properties files for portal & shindig as described in <a
href="#configure">configuring MongoDB</a></p>
+<h2 id="demo-binaries">Demo Binaries</h2>
+<p>To replace the JPA implementation with Mongo in an extracted demo binary or
other packaged Rave instance, take the following steps. This method is
<strong>NOT</strong> recommended for production deployments. The preferred
method is to modify a custom extension, or build, of Rave to as noted above:</p>
+<ol>
+<li>Start the demo binary as normal to allow it to extract the war
archives</li>
+<li>Remove rave-jpa.jar from webapps/portal/WEB-INF/lib &
webapps/ROOT/WEB-INF/lib</li>
+<li>Configure the properties files located in webapps/portal/WEB-INF/classes
& webapps/ROOT/WEB-INF/classes per <a href="#configure">configuring
MongoDB</a> </li>
+</ol>
+<p><a name="configure" /></p>
+<h2 id="configuring-mongodb">Configuring MongoDB</h2>
+<p>Both portal.properties & rave.shindig.properties have entries for
connecting to MongoDB. </p>
+<div class="codehilite"><pre><span class="n">mongo</span><span
class="o">.</span><span class="n">host</span><span class="o">=</span><span
class="n">localhost</span>
+<span class="n">mongo</span><span class="o">.</span><span
class="n">port</span><span class="o">=</span><span class="mi">27017</span>
+<span class="n">mongo</span><span class="o">.</span><span
class="n">database</span><span class="o">=</span><span class="n">rave</span>
+<span class="n">mongo</span><span class="o">.</span><span
class="n">username</span><span class="o">=</span>
+<span class="n">mongo</span><span class="o">.</span><span
class="n">password</span><span class="o">=</span>
+</pre></div>
+
+
+<h1 id="architecture">Architecture</h1>
+<p>Rave leverages Spring Data MongoDB to simplify interactions with the
MongoDB database using the <a
href="http://static.springsource.org/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb/core/MongoOperations.html">MongoOperations</a>
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:</p>
+<div class="codehilite"><pre><span class="o">|</span><span class="n">_</span>
<span class="n">Rave</span> <span class="n">MongoDB</span> <span
class="n">repository</span> <span class="n">implementations</span>
+ <span class="o">|</span>
+ <span class="o">|</span><span class="n">_</span> <span
class="n">MongoModelOperations</span> <span class="n">implementations</span>
+ <span class="o">|</span>
+ <span class="o">|</span><span class="n">_</span> <span
class="n">Spring</span> <span class="n">MongoOperations</span>
+ <span class="o">|</span>
+ <span class="o">|</span><span class="n">_</span> <span
class="n">Mongo</span> <span class="n">Driver</span>
+</pre></div>
+
+
+<p>As with any Rave component, MongoModelOperations instances can be wired in
by interface or class name to custom components. </p>
+<p><em>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.</em></p>
+ </article>
+ </section>
+ </div>
+
+ <footer class="footer">
+ <div class="container">
+ <p>
+ Copyright © 2012 The Apache Software Foundation, Licensed under
+ the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache
License, Version 2.0</a>.
+ <br />
+ Apache Rave, Apache, the Apache feather logo, and the Apache Rave
project logos are trademarks of The Apache Software Foundation.
+ All other marks mentioned may be trademarks or registered trademarks
of their respective owners.
+ </p>
+ </div>
+ </footer>
+ <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
+ <script
src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.1/bootstrap.min.js"></script>
+ <script src="//www.google.com/jsapi"></script>
+ <script>
+ google.load('search', '1', {language : 'en'});
+ google.setOnLoadCallback(function() {
+ var customSearchOptions = {}; var customSearchControl = new
google.search.CustomSearchControl(
+ '009412755592933514871:wrsgblows4o', customSearchOptions);
+
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
+ var options = new google.search.DrawOptions();
+
options.enableSearchboxOnly("http://www.google.com/cse?cx=009412755592933514871:wrsgblows4o");
+ customSearchControl.draw('cse-search-form', options);
+ }, true);
+ </script>
+</body>
+</html>