How to set up a JDBC connection pool for the PegaRULES database on Oracle (Tomcat)
During installation of Process Commander V5.X, you can define database connection pools either through JDBC data sources or through Process Commander prconfig.xml settings. If you are using Tomcat 5.5 or later as an application server, the data sources approach, described here, is recommended.
The procedure below is tested on Process Commander V5.4 SP2 and SP3 configured with Oracle 10g running on Apache Tomcat 5.5.
This procedure is also applicable to Process Commander 5.5x configured with supported versions of the Oracle database application running on Apache Tomcat 6.
Incorrect setup of the JDBC connection pool on an Apache Tomcat application server can result in errors such as the following:
BadTableMapping-UnsupportedColumnType pxCreateDateTime pegarules pr_data JDBC Type 91 PRPC53 DATE
Suggested Approach
Prerequisite: Complete your installation of Process Commander on Tomcat following the procedures in PegaRULES Process Commander Release V5.4 SP2, Installing on Tomcat Application Servers. Pay particular attention to the instructions for configuration procedures pertaining to the Oracle database application.
To set up a JDBC connection pool for the PegaRULES database using Oracle when your Process Commander application server is Apache Tomcat, follow these steps:
- Open the Tomcat context.xml file that defines your data source and specify the following parameters for the Resource element:
<Resource name="jdbc/PegaRULES"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@db_host:db_port:sid"
username="db_username" password="db_pwd" maxWait="-1" removeAbandoned="true" maxActive="30" maxIdle="10" removeAbandonedTimeout="60" logAbandoned="true" connectionProperties="oracle.jdbc.V8Compatible=true" />
- In the prconfig.xml file for both prweb and prdbutil, comment out the following parameters, which are not needed:
<!--
<env name="database/drivers" value="oracle.jdbc.OracleDriver" />
<env name="database/databases/PegaRULES/url" value="jdbc:oracle:thin:@db_host:db_port:sid" />
<env name="database/databases/PegaRULES/userName" value="db_username" />
<env name="database/databases/PegaRULES/password" value="db_pwd" />
<env name="Initialization/explicitTempDir" value="path_to_PRPC_Temp_Directory" />
<env name="database/databases/PegaRULES/propertiesFile" value="path_to_Oracle_conf_file\oracle.conf" />
-->
- In the prconfig.xml file for both prweb and prdbutil, uncomment the following parameter by removing the comment markers : <!-- and -->.
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
- In the web.xml file for prweb and prdbutil, specify the following parameters:
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/PegaRULES</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
- Restart the Tomcat application server.
Previous topic How to estimate disk space requirements for a PegaRULES database (Oracle) Next topic Improve performance of Oracle Database 9i with 10g thin client drivers