How to Configure Pega External JDBC Connection Pool
Environment: Tomcat 7, Oracle XE, Pega 7
Oracle JDBC Driver
Copy "ojdbc6.jar" and "ucp.jar" to apache-tomcat-7.0.62\lib
Tomecat Configuration
Add resource element into \apache-tomcat-7.0.62\conf\context.xml.....................
<Resource
auth="Container"
factory="oracle.ucp.jdbc.PoolDataSourceImpl"
type="oracle.ucp.jdbc.PoolDataSource"
description="Oracle UCP Pool in Tomcat"
connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
minPoolSize="2"
maxPoolSize="5"
inactiveConnectionTimeout="20"
user="
password="
url="jdbc:oracle:thin:@localhost:1521:xe"
connectionPoolName="testucp"
validateConnectionOnBorrow="true"
sqlForValidateConnection="select 1 from DUAL"
/>
Pega prweb.war "web.xml" configuration
Add "resource-ref" element into "web.xml"
<resource-ref>
<res-ref-name>jdbc/paceucp</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Pega external Database connection setting
Record Page-> SystemAdmin->Database->+Create
Note:
- Do not just use "jdbc/testucp", as Pega will add this value directly into "cxt.lookup()" method. so you have to put the entire lookup string : cxt.lookup( "java:/comp/env/jdbc/testucp" );
- You have to provide database username and password in this configuration form. Pege will not use the username/password in the context.xml file.
No comments:
Post a Comment