2.5.6. Database Configuration
production server profile.
Procedure 2.3. Configure Database
Create DefaultDS file
Create a default DS file for the desired database. Examples of this file are located inJBOSS_HOME/docs/examples/jca.Important
ADefaultDSfile must be supplied in theJBOSS_HOME/server/production/deploydirectory.Delete HSQLDB files
Delete the following files as they refer to the HSQLDB database:JBOSS_HOME/server/production/deploy/hsqldb-ds.xmlJBOSS_HOME/common/lib/hsqldb.jarJBOSS_HOME/common/lib/hsqldb-plugin.jarJBOSS_HOME/server/production/deploy/messaging/hsqldb-persistence-service.xml
Remove HSQLDB Security Domain
Comment out the security domain forHsqlDbRealmin theJBOSS_HOME/server/production/conf/login-config.xmlfile 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> -->Copy persistence service configuration file
The[database]-persistence-service.xmlfile contains the persistence service definition for JBoss Messaging, for the database specified by the [database] in the filename.Copy the[database]-persistence-service.xmlfile that corresponds to the database you are using from theJBOSS_HOME/docs/examples/jmsdirectory toJBOSS_HOME/server/production/deploy.Note
The table definitions in any[database]-persistence-service.xmlare not optimized for performance.Relocate JDBC driver libraries
Place the supported JDBC driver libraries in the directoryJBOSS_HOME/server/production/lib/.Important
Ensure you follow the policy guidelines in Section 2.5.5, “Java Security Manager Policy File ” and choose a supported JDBC driver from Table 2.1, “Allowed 5.1.0 Database and JDBC Driver Versions” or Table 2.2, “Allowed 5.1.1 Database and JDBC Driver Versions”to maintain an evaluated configuration.Add JDBC Grant Statement
Add the following grant statement for the JDBC driver you are using to the Java Security Manager policy file. The policy file is located inJBOSS_HOME/bin/security_cc.policy. Substitute the directory name of the JDBC driver where [cc.jdbc.driver] is specified in the code sample.Important
Each JDBC driver can use different permissions. Check the JDBC driver documentation and replacejava.security.AllPermission;with a secure permission scheme supported by the driver.// granting permissions to JDBC driver grant codeBase "file:${jboss.server.home.dir}/lib/[cc.jdbc.driver]" { permission java.security.AllPermission; };Oracle Database Persistence Plugin Optimization
When using the Oracle Database, the database persistence plugin definition must be changed inJBOSS_HOME/server/production/deploy/ejb2-timer-service.xmlfrom being:<attribute name="DatabasePersistencePlugin"> org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin </attribute>
to being:<attribute name="DatabasePersistencePlugin"> org.jboss.ejb.txtimer.OracleDatabasePersistencePlugin </attribute>
Note
java:/DefaultDS. The database has to be separated from all application databases: user applications must not provide additional tables to the java:/DefaultDS database, but must use their own dedicated databases to store their objects.
java:/DefaultDS database, as such injections are always limited to the connected database.
Note

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.