My Oracle Support Banner

Universal Connection Pool for JDBC Doesn’t Work Properly Using JNDI (Doc ID 1307692.1)

Last updated on MARCH 12, 2019

Applies to:

JDBC - Version 11.2.0.1.0 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="<USERNAME>"
password="<PASSWORD>" url="jdbc:oracle:thin:@<HOST>:1522:<SID>"
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 explicitly setting the property value the issue does not occur.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.