You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by bu...@apache.org on 2012/03/02 14:18:58 UTC

svn commit: r807070 - in /websites/staging/rave/trunk/content: ./ rave/documentation/configure-database.html

Author: buildbot
Date: Fri Mar  2 13:18:58 2012
New Revision: 807070

Log:
Staging update by buildbot for rave

Modified:
    websites/staging/rave/trunk/content/   (props changed)
    websites/staging/rave/trunk/content/rave/documentation/configure-database.html

Propchange: websites/staging/rave/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Mar  2 13:18:58 2012
@@ -1 +1 @@
-1296165
+1296193

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 Fri Mar  2 13:18:58 2012
@@ -68,10 +68,10 @@
 
   <div id="content">
     <h1 class="title">Configure the databases</h1>
-    <h2 id="default_setup">Default setup</h2>
+    <h2 id="default-setup">Default setup</h2>
 <p>In the default setup, Rave uses a file-based <a href="http://www.h2database.com/">H2 database</a>. Rave and Shindig run in the same 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>
-<h3 id="filling_the_default_database">Filling the default database</h3>
+<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">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;dataSourcePopulator&quot;</span> <span class="na">class=</span><span class="s">&quot;org.apache.rave.jdbc.util.DataSourcePopulator&quot;</span><span class="nt">&gt;</span>
     <span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;executeScriptQuery&quot;</span> <span class="na">value=</span><span class="s">&quot;SELECT * FROM WIDGET&quot;</span><span class="nt">/&gt;</span>
@@ -85,7 +85,7 @@ separate web applications but share data
 
 
 <p>If the query in <code>executeScriptQuery</code> returns no error and no results, the database will be populated with the contents of <code>scriptLocations</code>.</p>
-<h3 id="access_the_default_database">Access the default database</h3>
+<h3 id="access-the-default-database">Access the default database</h3>
 <p>When the application is running, the H2 databases can be accessed through a web interface. In the default setup this is configured using a Spring bean:</p>
 <div class="codehilite"><pre><span class="nt">&lt;bean</span> <span class="na">id=</span><span class="s">&quot;org.h2.tools.Server-WebServer&quot;</span> <span class="na">class=</span><span class="s">&quot;org.h2.tools.Server&quot;</span>
       <span class="na">factory-method=</span><span class="s">&quot;createWebServer&quot;</span> <span class="na">depends-on=</span><span class="s">&quot;dataSource&quot;</span>
@@ -96,17 +96,18 @@ separate web applications but share data
 
 
 <p>Both Rave and Shindig are accessible from the database: <a href="http://localhost:11111">http://localhost:11111</a>.  The default 
-username is <code>sa</code>, password is <code>local</code>, and JDBC URL is <code>jdbc:h2:file:///tmp/rave_db</code>.  You can change the file location
-for both databases by editing Rave's top level pom.xml file. Change the property <code>rave.database.location</code> to the desired
+username is <code>sa</code>, password is <code>local</code>, and JDBC URL is <code>jdbc:h2:file:///tmp/rave_db</code>. In Windows the JDBC URL is <code>jdbc:h2:file://c:/tmp/rave_db</code> if you run Apache Rave from the c: drive.<br />
+</p>
+<p>You can change the file location for both databases by editing Rave's top level pom.xml file. Change the property <code>rave.database.location</code> to the desired
 value.</p>
-<h2 id="setup_a_different_database">Setup a different database</h2>
+<h2 id="setup-a-different-database">Setup a different database</h2>
 <p>First start with <a href="rave-extensions.html">extending Rave</a>.</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.
 The default portal properties can be found in <code>rave-portal/src/main/resources/portal.properties</code>, the default Shindig properties in <code>rave-shindig/src/main/resource/rave.shindig.properties</code>.</p>
-<h2 id="sample_values">Sample values</h2>
+<h2 id="sample-values">Sample values</h2>
 <h3 id="mysql">MySQL</h3>
-<h4 id="jdbc_driver">JDBC driver</h4>
+<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>
@@ -143,7 +144,7 @@ The default portal properties can be fou
 <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>allowMultiQueries=true</code> to the driver URL.</p>
 <h3 id="postgresql">PostgreSQL</h3>
-<h4 id="jdbc_driver_1">JDBC driver</h4>
+<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>
@@ -182,8 +183,8 @@ The default portal properties can be fou
 <li>The DataSourcePopulator cannot handle a PostgreSQL database that has not yet been initialized.</li>
 <li>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.sql file.</li>
 </ul>
-<h3 id="oracle_10g">Oracle 10g</h3>
-<h4 id="jdbc_driver_2">JDBC driver</h4>
+<h3 id="oracle-10g">Oracle 10g</h3>
+<h4 id="jdbc-driver_2">JDBC driver</h4>
 <p>Install the <a href="http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html">Oracle JDBC driver</a> in the lib directory of your Apache Tomcat instance. This driver is not available in a public Maven repository.</p>
 <h4 id="properties_2">Properties</h4>
 <p>Rave portal:</p>
@@ -210,7 +211,7 @@ The default portal properties can be fou
 </pre></div>
 
 
-<h4 id="initial_data">Initial data</h4>
+<h4 id="initial-data">Initial data</h4>
 <p>The syntax for setting variables in SQL queries in Oracle is different from the syntax in H2 databases. Therefore the default data cannot be loaded using the initial_data.sql file.
 OpenJPA can create the schema. With help from <a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html">Oracle SQL Developer</a> the minimal set of necessary data can be inserted. The script below inserts the Apache Rave portal sequences, the page layouts and granted permissions:</p>
 <div class="codehilite"><pre><span class="n">SET</span> <span class="n">serveroutput</span> <span class="n">ON</span>