-
1. Re: JBOSS Pooling
chvnkishore Jun 27, 2006 4:25 AM (in response to renierb)Follow these Steps....
Oracle Configuration
Oracle is a very popular enterprise database used for its performance and reliability. To configure JBoss 4.0 with Oracle, we first need to put Oracle's driver classes in the CLASSPATH.
STEP (1) :Copy Oracle's JDBC driver .zip file /jdbc/lib/classes12.zip to the server/default/lib directory.
STEP (2) :To use Oracle's transactional (XA) data source, copy /docs/examples/jca/oracle-xa-ds.xml to the /server/default/deploy directory. To configure with the non-XA data source, copy /docs/examples/jca/oracle-ds.xml instead, to /server/default/deploy dir.
STEP (3) :Next, we need to modify the oracle-ds.xml configuration file. The <driver-class/> and <connection-url/> settings for Oracle are as follows:
Oracle OCI Type 2 Driver
? Class: oracle.jdbc.driver.OracleDriver
? URL: jdbc:oracle:oci8:@
Oracle OCI Thin Type 4 Driver
? Class: oracle.jdbc.driver.OracleDriver
? URL: jdbc:oracle:thin:@::
Oracle OCI XA Type 2 Driver
? Class: oracle.jdbc.xa.client.OracleXADataSource
? URL: jdbc:oracle:thin:@::
Oracle OCI Type 2 Driver
? Class: oracle.jdbc.driver.OracleDriver
? URL: jdbc:oracle:oci8:@
In the Connection URL setting, is the HOST value specified in the /network/ADMIN/tnsnames.ora file, and is the PORT value specified in the tnsnames.ora file, and is the database name.
STEP (4) :Next, we modify the standardjaws.xml or jaws.xml configuration file.(Located @ server/default/conf) Set the and <type-mapping> elements as follows:
java:/OracleDS
<type-mapping>Oracle8</type-mapping>
STEP (5) :Next, we modify the standardjbosscmp-jdbc.xml or jbosscmp-jdbc.xml configuration file, setting the and <datasource-mapping> elements to use Oracle:
<jbosscmp-jdbc>
java:/OracleDS
<datasource-mapping>Oracle8</datasource-mapping>
</jbosscmp-jdbc>
STEP (6) :Finally, we need to modify login-config.xml to use Oracle. Add the following <application-policy> element to login-config.xml:
<application-policy name = "OracleDbRealm">
<login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName">sa</module-option>
<module-option name = "password"></module-option>
<module-option name ="managedConnectionFactoryName">
jboss.jca:service=LocalTxCM,name=OracleDS
</module-option>
</login-module>
</application-policy>
By modifying the oracle-ds.xml, standardjaws.xml, standardjbosscmp-jdbc.xml, and login-config.xml files, the JBoss 4.0 server is configured to be used with a Oracle database.