B.3 Configure Resource Reference in Tomcat Application Server
This section describes how to configure Resource Reference in Tomcat Application server.
This section is applicable only when the Web application server type is Tomcat.
Copy the Oracle JDBC driver file, ojdbc<version>.jar from <Oracle Home>/jdbc/lib and place it in <Tomcat Home>/lib.
See Hardware and Software Requirements to identify the correct ojdbc<version>.jar file version to be copied.
Create Data Source
Note:
The User-IDs for configuration/ atomic schemas have the prefix of setup info depending on the value set for PREFIX_SCHEMA_NAME in the <<APP Pack>>_SCHEMA_IN.XML file of the Schema Creator Utility.
For example: If the value set for PREFIX_SCHEMA_NAME is DEV and the schema name is mentioned as ofsaaconf, then the actual schema created in the database is DEV_ofsaaconf.
<Context path ="/<context name>" docBase="<Tomcat Installation Directory>/webapps/<context name>" debug="0" reloadable="true" crossContext="true">
<Resource auth="Container" name="jdbc/FICMASTER" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="<user id for the configuration schema>" password="<password for the above user id>" url="jdbc:oracle:thin:@<DB engine IP address>:<DB Port>:<SID>" maxActive="100" maxIdle="30" maxWait="10000"/>
<Resource auth="Container" name="jdbc/< INFORMATION DOMAIN NAME >"
type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" username="<user id for the atomic schema>" password="<password for the above user id>"
url="jdbc:oracle:thin:@<DB engine IP address>:<DB Port>:<SID>" maxActive="100" maxIdle="30" maxWait="10000"/>
</Context>Note:
- The <Resource> tag must be repeated for each Information Domain created.
- After the configuration, the "WAR" file must be created and deployed in Tomcat.
Define JDBC Connection Pooling
- Copy the $ORACLE_HOME/jdbc/lib/ojdbc<version>.jar file to the
path $TOMCAT_ DIRECTORY/lib/ directory.
See Hardware and Software Requirements to identify the correct ojdbc<version>.jar file version to be copied.
- Edit the server.xml file available under the
$TOMCAT_DIRECTORY/conf/ directory with the following changes,
which is required for connection pooling.
Note:
- $APP_DEPLOYED_PATH$ must be replaced by the OFSAAI application deployed path
- $INFODOM_NAME$ must be replaced by Infodom Name
- $ATOMICSCHEMA_USERNAME$ must be replaced by an Atomic schema database user name.
- $ATOMICSCHEMA_PASSWORD$ must be replaced by an Atomic schema database password.
- $JDBC_CONNECTION_URL must be replaced by JDBC connection string
jdbc:Oracle:thin:<IP>:<PORT>:<SID>.
For example: jdbc:oracle:thin 192.168.0.1:1521:soluint
The User-IDs for configuration/ atomic schemas have the prefix of setup info depending on the value set for PREFIX_SCHEMA_NAME in the <<APP Pack>>_ SCHEMA_IN.XML file of Schema Creator Utility.
For example: if the value set for PREFIX_SCHEMA_NAME is DEV and the schema name is mentioned as ofsaaconf, then the actual schema created in the database is DEV_ofsaaconf.
Configure ClassLoader for Apache Tomcat
- Edit the server.xml file available in $TOMCAT_HOME/conf/ directory.
- Add the tag <Loader delegate="true"/> within the <Context> tag, above before the <Resource> tag. This is applicable only when the web application server is Apache Tomcat 8.