Appendix B. Setting up Red Hat Application Server to Run with Oracle

Red Hat Application Server comes preconfigured to use PostgreSQL as the backend. To configure Red Hat Application Server to run with Oracle:

  1. Edit $JONAS_ROOT/conf/jonas.properties, and change the datasource name from PostgreSQL1 to Oracle1:

    jonas.service.dbm.datasources Oracle1
  2. Edit $JONAS_ROOT/conf/Oracle1.properties to fill in the appropriate values for the Oracle installation. Update the hostname, port, and SID for the datasource.url entry, as well as the datasource.username and datasource.password.

    For example, for an Oracle installation on a server named to-rhaps1, your properties file should have the following entries:

    datasource.url jdbc:oracle:thin:@to-rhaps1:1521:orcl
    datasource.classname oracle.jdbc.driver.OracleDriver
    datasource.username jonas
    datasource.password jonas
  3. Make sure you have the Oracle JDBC installed, then update $JONAS_ROOT/bin/unix/config_env to change the value for ORACLE_CLASSES to point to your JDBC driver. For example:

    ORACLE_CLASSES=/usr/share/java/oracle-jdbc-9.0.2.0.0.jar
  4. Restart JOnAS so that the changes become effective.