Connection Labelling Cannot Be Used With PoolXADataSource from Universal Connection Pool Resulting in Null Connection (Doc ID 1573094.1)

Last updated on AUGUST 03, 2016

Applies to:

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

Symptoms

With version 11.2.0.3 of the Thin JDBC driver, using PoolXADataSource from Universal Connection Pool returns NULL connection when ConnectionLabellingCallback is called.
A database connection should be returned when using PoolXADataSource.

To check if you are seeing this problem, you can try running the following standalone Java program:

 

If you are seeing the problem, then the output from the program will look like:

[oracle]$ java -cp .:ojdbc6.jar:ucp.jar LabelTest
----------------
using dataSource
----------------
'configure' called
  requestedLabels: {IMPORTANT_FEATURE=DESIRED_VALUE}
  connection: $Proxy0@4036afc5

------------------
using xaDataSource
------------------
'configure' called
  requestedLabels: {IMPORTANT_FEATURE=DESIRED_VALUE}
  connection: null

The connection for XADataSource is NULL. This is incorrect behaviour.

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