Sun Java System Portal Server 7.1 Configuration Guide

Chapter 2 Managing Java DB for Portal Server

This chapter includes the following:

Introduction to Java DB

By default, the Sun Java System Portal Server software uses the JavaTM DB to store configuration and membership for the collaboration feature. It is used by the desktop. Java DB is also used by wiki, fileshare and survey portlet applications. The Portal Server software installs and configures the database.


Tip –

For information on switching to enterprise-scale databases, see this article.


The Portal Server software does not manage the Java DB process; it must be manually started and stopped using the Java DB NetworkServerControl class (see To Start and Stop Java DB for more information). The default database user name is portal and the password is a random string generated during installation. On a production system, change the credentials to secure the system.

Database Configuration

The Portal Server software components use Java DB through Java EE JDBC resources. When a new portal instance is created, the Portal Server software creates one JDBC resource for each component that accesses the database. In other words, there is one resource per component, per Portal Server instance.

The resource configuration can be modified using the web container console or command line interface. The database URL for the Java DB community database is of the form jdbc:derby://host[:port]/component_portal-ID. When connecting to Java DB using third-party tools, use the driver org.apache.derby.jdbc.ClientDriver. This driver is in the JAR file /opt/SUNWjavadb/lib/derbyclient.jar.

Starting, Stopping, and Disabling the Java DB

There are two portal components that use the relational database: community membership and configuration and portlet applications, such as wiki, survey, and filesharing. By default, Portal Server uses Java DB. After the installation, Portal Server can be configured to switch to Oracle. In that case, you need to shut down the Java DB database. Java DB should also be stopped if community features and the portlet application are not used in the deployed portal.

For each portal component using relational database, a separate database instance is configured with default userid and password. After the installation, you are recommended to change the default password and the access permissions of the properties files containing them. For this release of the Portal Server software, see the release notes for more information on how to change the password.

ProcedureTo Start and Stop Java DB

  1. Set the classpath. The derby.jar, derbytools.jar, and derbynet.jar files must be in your classpath. By default, these JAR files are installed into /opt/SUNWjavadb/lib directory.

  2. Set the system property derby.system.home to PortalServer-DataDir/derby.

  3. Stop and start the database using Java DB NetworkServerControl class.

    For example, type:

    • java -Dderby.system.home=PortalServer-DataDir/derby org.apache.derby.drda.NetworkServerControl start to start the database.

    • java -Dderby.system.home=PortalServer-DataDir/derby org.apache.derby.drda.NetworkServerControl shutdown to stop the database.


    Note –

    By default, the Application Server's instance of Java DB uses the same port as Portal's (the Java DB default port of 1527). If you wish to run the Application Server's instance of Java DB, change the port from 1527 to some other value.

    If the Java DB process remains connected to a terminal, it will quit when the terminal exits, when the user logs out, or when the system in restarted. To detach the Java DB process from the terminal on UNIX-based systems, use the nohup command. On Windows system, make the Java DB process a Windows service.

    After the installation, Portal Server software can be configured to switch to Oracle. In that case, Java DB need not be running. It can also be stopped if use of Java DB is disabled for desktop and the portlet applications (such as wiki, fileshare, surveys) are not used in the deployed portal.


ProcedureTo Disable Use of Java DB by Desktop

The Portal Desktop uses the database (Java DB or Oracle) to get community membership and configuration for users. If you are not using the Community Feature, this is not required. To prevent the Portal Desktop from getting user membership and configuration from the database, perform the following steps.

  1. Log in to the Portal Server host as root and go to PortalServer-DataDir/portals/portal-ID/config/ directory.

  2. Edit the communitymc.properties file and remove the jdo entry from the manager.contributors list.


    Note –

    If this change is applied, the community sample does not function properly.


  3. Restart the web container.