Menu Close
Settings Close

Language and Page Formatting Options

Red Hat Training

A Red Hat training course is available for JBoss Enterprise Application Platform Common Criteria Certification

2.5.4. Database Configuration

The default database HSQLDB that the Enterprise Application Platform ships with must be disabled as it is not supported. This section will outline how this can be done and then refer you to information on how to configure supported databases. This must be done in the production server profile.
  1. Create a default DS file for the desired database. Examples of this file are located in ${JBOSS_HOME}/docs/examples/jca.

    Important

    A DefaultDS file must be supplied in the ${JBOSS_HOME}/server/production/deploy directory.
  2. Delete the following files as they refer to the HSQLDB database:
    • ${JBOSS_HOME}/server/production/deploy/hsqldb-ds.xml
    • ${JBOSS_HOME}/server/production/lib/hsqldb.jar
    • ${JBOSS_HOME}/server/production/lib/hsqldb-plugin.jar
    • ${JBOSS_HOME}/server/production/deploy/jboss-messaging.sar/clustered-hsqldb-persistence-service.xml
  3. Copy the file oracle-persistence-service.xml from ${JBOSS_HOME}/docs/examples/jms/oracle-persistence-service.xml to ${JBOSS_HOME}/server/production/deploy/jboss-messaging.sar/.
    This file contains the definition of persistence service for JBoss Messaging when using an Oracle Database as storage.

    Note

    The table definitions in oracle-persistence-service.xml are not optimized for performance.
  4. Place your JDBC driver libraries in the directory ${JBOSS_HOME}/server/production/lib/.
    If the security policy is to be used, proper permissions must be provided for access to it.
  5. When using the Oracle Database, the database persistence plugin definition must be changed in ${JBOSS_HOME}/server/production/deploy/ejb-deployer.xml from being:
    <attribute name="DatabasePersistencePlugin">
    org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin
    </attribute>
    to being:
    <attribute name="DatabasePersistencePlugin">
    org.jboss.ejb.txtimer.OracleDatabasePersistencePlugin
    </attribute>
  6. Comment out the policy for HsqlDbRealm in the ${JBOSS_HOME}/server/production/conf/login-config.xml file as shown.
    <!-- Security domains for testing new jca framework
    <application-policy name = "HsqlDbRealm">
      <authentication>
        <login-module 
          code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" 
          flag = "required">
          <module-option name = "principal">sa</module-option>
          <module-option name = "userName">cctest</module-option>
          <module-option name = "password">cc1248</module-option>
          <module-option name = "managedConnectionFactoryName">
            jboss.jca:service=LocalTxCM,name=DefaultDS
          </module-option>
        </login-module>
      </authentication>
    </application-policy>
    -->