Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add some documentation for using an external database

git-svn-id: https://svn.apache.org/repos/asf/continuum/trunk@1427304 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 2612035e0092c06517fb9320647171e5a015544c 1 parent bedd4e7
Brett Porter brettporter authored
43 continuum-docs/src/site/apt/administrator_guides/external-db.apt
View
@@ -14,25 +14,52 @@ How to use an external database?
* MySQL
- * MS SQL Server
+ * Postgres
- * Oracle (not yet, but coming soon)
+ * MS SQL Server (with modifications)
+
+ * Oracle (with modifications)
* Configure Continuum
+ There is some information in the installation guides for the {{{../installation/standalone.html} standalone Continuum
+ installation}} and the {{{../installation/tomcat.html} Continuum web application deployed to Tomcat}}.
+
** Standalone version
- To use an external database with Continuum standalone, you must configure DataSources in <<<$CONTINUUM_HOME/conf/jetty.xml>>>
+ To use an external database with Continuum standalone, you must configure DataSources in <<<$CONTINUUM_HOME/contexts/continuum.xml>>>
+
+%{snippet|id=datasources|url=http://svn.apache.org/repos/asf/continuum/trunk/continuum-jetty/src/main/contexts/continuum.xml}
+
+ In addition, you must add the JDBC driver to the <<<$CONTINUUM_HOME/lib>>> directory, and update
+ <<<$CONTINUUM_HOME/conf/wrapper.conf>>> to list the driver instead of Derby. For example:
+
+----
+wrapper.java.classpath.15=%REPO_DIR%/postgresql-8.4-702.jdbc3.jar
+----
+
+ If you use MS SQL Server or Oracle, you will need to adjust the
+ <<<$CONTINUUM_HOME/apps/continuum/WEB-INF/classes/META-INF/plexus/application.xml>>> file to change the
+ <<<javax.jdo.option.Mapping>>> value from <<<default>>> to <<<mssql>>> or <<<oracle>>> respectively. Bear in mind that
+ this change will need to be made again across release upgrades.
+
+%{snippet|id=mapping|url=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml}
+
+** Web Application
+
+ To use an external database with the Continuum web application, you should configure the DataSource in your container.
-%{snippet|id=datasources|url=http://svn.apache.org/repos/asf/continuum/trunk/continuum-jetty/src/main/conf/jetty.xml}
+ Make sure the JDBC driver is available in the expected location for your container.
-** Webapp
+ If you use MS SQL Server or Oracle, you will need to adjust the
+ <<<WEB-INF/classes/META-INF/plexus/application.xml>>> file in the unpacked web application to change the
+ <<<javax.jdo.option.Mapping>>> value from <<<default>>> to <<<mssql>>> or <<<oracle>>> respectively. Bear in mind that
+ this change will need to be made again across release upgrades.
- To use an external database with the Continuum webapp, you should configure the DataSource in your container.
+%{snippet|id=mapping|url=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml}
* Shutdown Procedure
When using an external database, it is very important to stop Continuum prior to stopping or restarting the database.
Continuum may exhibit unpredictable behavior if the database disappears while it is running, and may not recover
- once the database comes back up. If this happens, you must re-start Continuum. If you experience errors after
- re-starting, the data may be corrupted and may need to be fixed by editing records directly in the database.
+ once the database comes back up. If this happens, you must re-start Continuum.
6 continuum-docs/src/site/apt/installation/standalone.apt
View
@@ -39,9 +39,15 @@ Installing Continuum Standalone
<<<validationQuery>>> to one that can successfully execute on your database (or remove the setting if you do not
want to validate connections before using them).
+ You must ensure the JDBC driver is available in the classpath, by copying it to the <<<$CONTINUUM_HOME/lib>>>
+ directory and updating <<<$CONTINUUM_HOME/conf/wrapper.conf>>> to ensure it is listed instead of the Derby JAR.
+
Refer to the {{{http://commons.apache.org/dbcp/} Commons DBCP}} documentation for more advanced configuration of the
connection pool.
+ More information on supported databases is available in the Administrator's Guide on
+ {{{../administrator_guides/external-db.html} External Databases}}.
+
** Testing the Configuration
Start Continuum from the console in the <<<$CONTINUUM_HOME/bin/>>> directory:
5 continuum-docs/src/site/apt/installation/tomcat.apt.vm
View
@@ -60,6 +60,9 @@ Guide to Install Continuum on Tomcat
[[4]] Details specific to Apache Tomcat, JavaMail, or Apache Derby are left for the reader to research on those
projects websites.
+ More information on using other supported databases is available in the Administrator's Guide on
+ {{{../administrator_guides/external-db.html} External Databases}}.
+
** {The JavaMail / Activation JAR files}
<<Note:>> Continuum requires JavaMail 1.4 (or later)
@@ -94,6 +97,8 @@ Guide to Install Continuum on Tomcat
* Derby 10.1.3.1 - {{{http://repo1.maven.org/maven2/org/apache/derby/derby/10.1.3.1/derby-10.1.3.1.jar}derby-10.1.3.1.jar}}
+ If you have configured a different database, please copy that JDBC driver in place of the Derby driver.
+
** {Configure the appserver.base Java system property}
The <<<$\{appserver.base\}>>> system property is used by the Continuum internal logging configuration to determine
5 continuum-webapp/src/main/resources/META-INF/plexus/application.xml
View
@@ -252,13 +252,16 @@
<persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
+ <!-- START SNIPPET: mapping -->
<otherProperties>
<property>
<name>javax.jdo.option.Mapping</name>
<value>default</value>
- <!-- change this property for mssql support - CONTINUUM-697 -->
+ <!-- change this property for SQL Server or Oracle support - CONTINUUM-697 -->
<!-- value>mssql</value -->
+ <!-- value>oracle</value -->
</property>
+ <!-- END SNIPPET: mapping -->
<property>
<name>org.jpox.autoCreateSchema</name>
<value>true</value>
Please sign in to comment.
Something went wrong with that request. Please try again.