Author: thomas.heute(a)jboss.com
Date: 2010-03-19 11:23:35 -0400 (Fri, 19 Mar 2010)
New Revision: 2313
Modified:
portal/branches/EPP_5_0_0_ER04_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/modules/configuration/Database_Configuration.xml
Log:
Modifiying Database configuration process for EPP
Modified:
portal/branches/EPP_5_0_0_ER04_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/modules/configuration/Database_Configuration.xml
===================================================================
---
portal/branches/EPP_5_0_0_ER04_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/modules/configuration/Database_Configuration.xml 2010-03-19
15:10:25 UTC (rev 2312)
+++
portal/branches/EPP_5_0_0_ER04_Branch_Docs/Enterprise_Portal_Platform_Reference_Guide/en-US/modules/configuration/Database_Configuration.xml 2010-03-19
15:23:35 UTC (rev 2313)
@@ -31,54 +31,48 @@
<title>Configuring the database for JCR</title>
<para>To configure the database used by JCR you will need to edit the
-
file:<programlisting>$JBOSS_HOME/server/default/conf/gatein/configuration.properties</programlisting></para>
+ datasource descriptor located at
+
$JBOSS_HOME/server/default/deploy/gatein-ds.xml:<programlisting><no-tx-datasource>
+ <jndi-name>gatein-jcr</jndi-name>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}gatein${/}hypersonic${/}gatein-jcr-localDB</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
- <para>For Tomcat, the file is located at
<programlisting>$TOMCAT_HOME/gatein/conf/configuration.properties</programlisting></para>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+
<prepared-statement-cache-size>32</prepared-statement-cache-size>
+</no-tx-datasource></programlisting></para>
- <para>And edit the values of driver, url, username and password with the
- values for your JDBC connection (Please refer to your database JDBC driver
- documentation).</para>
+ <para>And edit the values of driver-class, connection-url, usern-ame and
+ password with the values for your database (Please refer to your database
+ JDBC driver documentation).</para>
- <programlisting
role="XML">gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
-gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
-gatein.jcr.datasource.username=sa
-gatein.jcr.datasource.password=
-</programlisting>
-
- <para>In that case, the name of the database is "jdbcjcr_${name}",
${name}
- should be part of the database name, as it is dynamically replaced by the
- name of the portal container extension (for instance
- gatein-sample-portal.ear defines "sample-portal" as container name and the
- default portal defines "portal" as container name).</para>
-
<para>In the case of HSQL the databases are created automatically, for any
- other database you will need to create a database named jdbcjcr_portal
- (and "jdbcjcr_sample-portal" if you kept gatein-sample-portal.ear in
- $JBOSS_HOME/server/default/deploy. Note that some database wont accept '-'
- in a database name and you will have to delete
- $JBOSS_HOME/server/default/deploy/gatein-sample-portal.ear)</para>
+ other database you will need to create a database.</para>
- <para>Make sure the user has rights to create tables on jdbcjcr_portal and
+ <para>Make sure the user has rights to create tables on the database and
to update them as during the first startup they will be automatically
created.</para>
<para>Also add the JDBC driver into the classpath, for instance in
- $JBOSS_HOME/server/default/lib (or $TOMCAT_HOME/lib if you are running on
- Tomcat)</para>
+ $JBOSS_HOME/server/default/lib</para>
<para>MySQL example:</para>
<para>Let's configure our JCR to store data in MySQL, let's pretend we
have a user named "gateinuser" with a password "gateinpassword".
We would
- create a database "mygateindb_portal" (Remember that _portal is required)
- and assign him the rights to create tables.</para>
+ create a database "mygateindb" and assign him the rights to create
+ tables.</para>
<para>Then we need to add the MySQL JDBC connector in the classpath and
- finally edit gatein.ear/02portal.war/WEB-INF/conf/jcr/jcr-configuration
- with:<programlisting>gatein.jcr.datasource.driver=com.mysql.jdbc.Driver
-gatein.jcr.datasource.url=jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}
-gatein.jcr.datasource.username=gateinuser
-gatein.jcr.datasource.password=gateinpassword
+ finally edit
+
$JBOSS_HOME/server/default/deploy/gatein-ds.xml:<programlisting><jndi-name>gatein-jcr</jndi-name>
+<connection-url>jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}</connection-url>
+<driver-class>com.mysql.jdbc.Driver</driver-class>
+<user-name>gateinuser</user-name>
+<password>gateinpassword</password>
</programlisting></para>
</section>
@@ -88,13 +82,25 @@
<para>By default users are stored in database. To change the database to
store users, you will need to edit the file:</para>
-
<para><programlisting>$JBOSS_HOME/server/default/conf/gatein/configuration.properties</programlisting>For
- Tomcat, the file is located at
<programlisting>$TOMCAT_HOME/gatein/conf/configuration.properties</programlisting></para>
+
<para><programlisting>$JBOSS_HOME/server/default/deploy/gatein-ds.xml</programlisting></para>
- <para>You will find the same configuration as in
-
jcr-configuration.xml:<programlisting>gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
-gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
-gatein.idm.datasource.username=sa
-gatein.idm.datasource.password</programlisting></para>
+ <para>You will find the same kind of configuration as For JCR:</para>
+
+ <para><programlisting> <no-tx-datasource>
+ <jndi-name>gatein-jcr</jndi-name>
+
<connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}gatein${/}hypersonic${/}gatein-jcr-localDB</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+
<prepared-statement-cache-size>32</prepared-statement-cache-size>
+ </no-tx-datasource>
+</programlisting></para>
+
+ <para>More information about setting up datasources can be found in the
+ Enterprise Application Platform documentation.</para>
</section>
</section>
Show replies by date