Universal Connection Pool For Jdbc Doesn’T Work Properly Using Jndi (Doc ID 1307692.1)

Last updated on SEPTEMBER 01, 2014

Applies to:

JDBC - Version 11.2.0.1 and later
Information in this document applies to any platform.

Symptoms

The pool is always created with 0 connections and do not assumes the initialPoolsize value
when using JNDI configuration. However while using API's to set the initial pool size it works
The issue occurs on the following characteristics:

Apache Tomcat 5.5.28
JDBC driver version: 11.2.0.1.0
UCP version: 11.2.0.1.0
Oracle Database 10.2.0.4
Windows Server 2003 R2 Standard Edition 64 bits SP2

The JNDI configuration in use is the following:
<Resource name="jdbc/datasource" type="oracle.ucp.jdbc.PoolDataSource"
factory="oracle.ucp.jdbc.PoolDataSourceImpl" user="xxx"
password="xxx" url="jdbc:oracle:thin:@xxx:1522:xxx"
connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
connectionPoolName="ConnectionPool" description="Datasource"
initialPoolSize="5" minPoolSize="5" maxPoolSize="20"
sqlForValidateConnection="select 1 from DUAL"
validateConnectionOnBorrow="true" />

When setting the value of initialPoolSize using the API or overriding the PoolDataSourceImpl and explicitely seeting the property value the issue does not occur.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms