Sun Java System Portal Server 7.1 Community Sample Guide

Introduction to Java DB

The sections contains the following:

Introduction to the Database

The Sun Java System Portal Server software uses the open-source database written in the JavaTM programming language (Java DB) to store configuration and membership for the collaboration feature. The Portal Server software installs and configures the database. The Java DB runs as a standalone Java application. The Portal Server software does not manage the Java DB process; it must be manually started and stopped using the Java DB NetworkServerControl application (see Starting, Stopping, and Disabling the Java DB for more information). The database credentials are portal/portal.

Database Configuration

The Portal Server software creates a Java DB server instance at install time. A Java DB server instance is defined by a unique value for the Java DB system home directory. By default, the value is PortalServer-DataDir/derby. Whenever the Java DB server process is started, it must be passed the Java DB system home value by specifying the system property derby.system.home. The Java DB system home directory contains the database configuration, logs, and data files.

Datasource Creation

The Portal Server software components that use the Java DB access it through J2EE JDBC datasources. When a new portal instance is created, the portal software creates one JDBC datasource for each component that accesses the database. In other words, there is one datasource per component, per portal server instance.

Portal accesses the database using a JDBC datasource configured in the web container. The datasource 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 the Java DB using third-party tools, use the driver org.apache.derby.jdbc.ClientDriver. This driver is in the JAR file /usr/share/lib/Derby/derbyclient.jar.