rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r795734 - /websites/staging/rave/trunk/content/rave/documentation/configure-database.html
Date Wed, 14 Sep 2011 12:08:43 GMT
Author: buildbot
Date: Wed Sep 14 12:08:43 2011
New Revision: 795734

Log:
Staging update by buildbot

Modified:
    websites/staging/rave/trunk/content/rave/documentation/configure-database.html

Modified: websites/staging/rave/trunk/content/rave/documentation/configure-database.html
==============================================================================
--- websites/staging/rave/trunk/content/rave/documentation/configure-database.html (original)
+++ websites/staging/rave/trunk/content/rave/documentation/configure-database.html Wed Sep
14 12:08:43 2011
@@ -68,15 +68,18 @@
 
   <div id="content">
     <h1 class="title">Configure the databases</h1>
-    <h2 id="default_values">Default values</h2>
+    <h2 id="default_setup">Default setup</h2>
 <p>In the default setup Rave uses an in memory <a href="http://www.h2database.com/">H2
database</a>.</p>
+<p>All schemas 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>
 <p>To access the tables for the portal, go to <a href="http://localhost:11111">http://localhost:11111</a>.

 To access the tables for the OpenSocial container (Shindig), go to <a href="http://localhost:22222">http://localhost:22222</a>.
Username is <code>sa</code>, password <code>local</code>.</p>
 <h2 id="setup_a_different_database">Setup a different database</h2>
-<p>All schemas are generated using JPA annotations. In the default setup 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>
 <p>First start with <a href="rave-extensions.html">extending Rave</a>.</p>
-<h2 id="mysql_setup">MySQL setup</h2>
-<p>Make sure the mysql jdbc driver ends up in the classpath. Either add it to a common
lib directory of the application container or add this dependency to the pom of the several
modules:</p>
+<p>Make sure the jdbc driver ends up in the classpath. Either add it to a common lib
directory of the application container or add its dependency to the pom of the several modules.</p>
+<p>Then customize the properties for the portal and Shindig to use the database of
your choice.</p>
+<h2 id="sample_values">Sample values</h2>
+<h3 id="mysql">MySQL</h3>
+<h4 id="jdbc_driver">JDBC driver</h4>
 <div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
     <span class="nt">&lt;groupId&gt;</span>mysql<span class="nt">&lt;/groupId&gt;</span>
     <span class="nt">&lt;artifactId&gt;</span>mysql-connector-java<span
class="nt">&lt;/artifactId&gt;</span>
@@ -85,7 +88,8 @@ To access the tables for the OpenSocial 
 </pre></div>
 
 
-<p>Customize the properties for the Rave portal:</p>
+<h4 id="properties">Properties</h4>
+<p>Rave portal:</p>
 <div class="codehilite"><pre><span class="n">portal</span><span
class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span
class="n">url</span><span class="o">=</span><span class="n">jdbc:mysql:</span><span
class="sr">//</span><span class="n">localhost:3306</span><span class="o">/</span><span
class="n">rave</span><span class="o">-</span><span class="n">portal</span>
 <span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span
class="o">.</span><span class="n">driver</span><span class="o">=</span><span
class="n">com</span><span class="o">.</span><span class="n">mysql</span><span
class="o">.</span><span class="n">jdbc</span><span class="o">.</span><span
class="n">Driver</span>
 <span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span
class="o">.</span><span class="n">username</span><span class="o">=</span><span
class="n">rave</span>
@@ -97,7 +101,7 @@ To access the tables for the OpenSocial 
 </pre></div>
 
 
-<p>Customize the properties for Rave Shindig:</p>
+<p>Rave Shindig:</p>
 <div class="codehilite"><pre><span class="n">rave</span><span
class="o">-</span><span class="n">shindig</span><span class="o">.</span><span
class="n">dataSource</span><span class="o">.</span><span class="n">url</span><span
class="o">=</span><span class="n">jdbc:mysql:</span><span class="sr">//</span><span
class="n">localhost:3306</span><span class="o">/</span><span class="n">rave</span><span
class="o">-</span><span class="n">shindig</span>
 <span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span
class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span
class="n">driver</span><span class="o">=</span><span class="n">com</span><span
class="o">.</span><span class="n">mysql</span><span class="o">.</span><span
class="n">jdbc</span><span class="o">.</span><span class="n">Driver</span>
 <span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span
class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span
class="n">username</span><span class="o">=</span><span class="n">rave</span>
@@ -109,9 +113,10 @@ To access the tables for the OpenSocial 
 </pre></div>
 
 
+<h4 id="notes">Notes</h4>
 <p>The DataSourcePopulator uses a single statement to execute all queries in the configured
SQL files. The MySQL JDBC driver does not allow this by default, unless you add <code>allowMultiple=true</code>
to the driver url.</p>
-<h2 id="postgresql_setup">PostgreSQL setup</h2>
-<p>Make sure the PostgreSQL jdbc driver ends up in the classpath. Either add it to
a common lib directory of the application container or add this dependency to the pom of the
several modules:</p>
+<h3 id="postgresql">PostgreSQL</h3>
+<h4 id="jdbc_driver_1">JDBC driver</h4>
 <div class="codehilite"><pre><span class="nt">&lt;dependency&gt;</span>
     <span class="nt">&lt;groupId&gt;</span>postgresql<span class="nt">&lt;/groupId&gt;</span>
     <span class="nt">&lt;artifactId&gt;</span>postgresql<span class="nt">&lt;/artifactId&gt;</span>
@@ -120,7 +125,8 @@ To access the tables for the OpenSocial 
 </pre></div>
 
 
-<p>Customize the properties for the Rave portal:</p>
+<h4 id="properties_1">Properties</h4>
+<p>Rave portal:</p>
 <div class="codehilite"><pre><span class="n">portal</span><span
class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span
class="n">url</span><span class="o">=</span><span class="n">jdbc:postgresql:</span><span
class="sr">//</span><span class="n">localhost:5432</span><span class="o">/</span><span
class="n">rave</span><span class="o">-</span><span class="n">portal</span>
 <span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span
class="o">.</span><span class="n">driver</span><span class="o">=</span><span
class="n">org</span><span class="o">.</span><span class="n">postgresql</span><span
class="o">.</span><span class="n">Driver</span>
 <span class="n">portal</span><span class="o">.</span><span class="n">dataSource</span><span
class="o">.</span><span class="n">username</span><span class="o">=</span><span
class="n">rave</span>
@@ -132,7 +138,7 @@ To access the tables for the OpenSocial 
 </pre></div>
 
 
-<p>Customize the properties for Rave Shindig:</p>
+<p>Rave Shindig:</p>
 <div class="codehilite"><pre><span class="n">rave</span><span
class="o">-</span><span class="n">shindig</span><span class="o">.</span><span
class="n">dataSource</span><span class="o">.</span><span class="n">url</span><span
class="o">=</span><span class="n">jdbc:postgresql:</span><span class="sr">//</span><span
class="n">localhost:5432</span><span class="o">/</span><span class="n">rave</span><span
class="o">-</span><span class="n">portal</span>
 <span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span
class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span
class="n">driver</span><span class="o">=</span><span class="n">org</span><span
class="o">.</span><span class="n">postgresql</span><span class="o">.</span><span
class="n">Driver</span>
 <span class="n">rave</span><span class="o">-</span><span class="n">shindig</span><span
class="o">.</span><span class="n">dataSource</span><span class="o">.</span><span
class="n">username</span><span class="o">=</span><span class="n">rave</span>
@@ -144,6 +150,7 @@ To access the tables for the OpenSocial 
 </pre></div>
 
 
+<h4 id="notes_1">Notes</h4>
 <p>The syntax for setting variables in SQL queries in PostgreSQL is different from
the syntax in H2 databases. Therefore the default data cannot be loaded using the initial
data.</p>
   </div>
 



Mime
View raw message