Sun Java System Portal Server 7.2 Deployment Planning Guide

ProcedureTo Replace the Derby Database

  1. Set up the database.

    1. Install RDBMS or identify one that already exits on the system.

    2. Create Database instance (or tablespace in the case of Oracle) to be used by collaboration.

    3. Create database user accounts.

    4. Establish appropriate privileges for the user accounts.

  2. Set up the Web Container for the New Database.

    1. Locate the JDBC driver.

    2. Add the JDBC driver to the web container's JVM software classpath.

    3. Add the JVM software option.

      -Djdbc.drivers=JDBC_DRIVER_CLASS

  3. Configure Community Membership and Configuration.

    1. Configure the communitymc database configuration file:

      PORTAL-DATA-DIR/portals/PORTAL-ID/config/portal.dbadmin.

      Parameters

      db.driver=vendor-specific-classpath.jdbc.ClientDriver

      db.driver.classpath=/opt/jarfile-directory-pathclient.jar

      community.db.user=database-user-account (created in step 1c).

      community.db.password=database-user-account-password (created in step 1c).

      community.db.url=jdbc:xxx://xxxxx.pstest.com:port/database-instance-created-in-step-1b.

    2. Remove the derby-specific property in:

      PORTAL-DATA-DIR/portals/PORTAL-ID/config/communitymc.properties.

      For example: javax.jdo.option.Mapping=derby

    3. Load the schema onto the database by using the following commands:

      cd /var/opt/SUNWportal/portals/portal1/config

      /usr/sfw/bin/ant -f config.xml -D"portal.id=portal1" configure

    4. Edit the JDBC resource in the web container configuration to point to the new database.

  4. Configure and Install Portlet Applications.

    1. Locate the portlet applications:

      PORTAL-DATA-DIR/portals/PORTAL-ID/portletapps

    2. Configure the portlet applications to use the new database, for example:

      cd /var/opt/SUNWportal/portals/portal1/portletapps/surveys

      Edit the tokens_xxx.properties file.

    3. Create the JDBC Resource for each application using the values from the tokens_xxx.properties file.

      • Resource JNDI Name: jdbc/DB-JNDI-NAME

      • Resource Type: javax.sql.DataSource

      • Datasource Classname: DB-DATASOURCE

      • User: DB-USER

      • Password: DB-PASSWORD

      • URL: DB-URL

    4. Undeploy the existing portlets that use Derby Database as the datastore.

    5. Deploy the newly configured portlet applications.