Changes in This Release for Oracle Universal Connection Pool for JDBC Developer's Guide

This preface contains:

Changes in Oracle Database 12c Release 1 (12.1)

The following are changes in Oracle Universal Connection Pool for JDBC Developer's Guide for Oracle Database 12c Release 1 (12.1).

New Features

The following features are new in this release:

Multitenant Data Source for Java

To enable sharing a common pool of connections across multiple PDBs (pluggable databases) or tenants, Oracle JDBC and UCP furnish the multitenant data source for Java. In Oracle Database 12c Release 1 (12.1), it is based on a combination of the following:

  • Global database user with access privileges to any PDB

  • UCP connection labeling

  • The new SET CONTAINER statement within a callback function:

    The advantage of the SET CONTAINER statement is that the pool does not have to create a new connection to a PDB, if there is an existing connection to a different PDB. The pool can use the existing connection and can connect to the desired PDB through the SET CONTAINER statement. Use the following command to achieve this:

    ALTER SESSION SET CONTAINER=<PDB Name>

    This avoids the need to create a new connection from scratch.

  • The UCP connection labeling callback interface

Following is an illustration of how multitenant data source for Java works:

  1. Tenant1 asks for a connection to PDB1, by calling the getConnection() method with the corresponding label that is mapped to a database ID.

  2. UCP searches the pool for a free connection, tentatively with the specified label.

  3. If Conn1 label reads PDB1, then the connection is handed to JDBC, and then to Tenant1 for use.

    Otherwise, if Conn1 label does not read PDB1, then the following occur:

    1. UCP uses the ALTER SESSION SET CONTAINER statement and invokes the user-implemented callback configure method to set Conn1 to PDB1.

    2. The SET CONTAINER statement is passed to the server and parsed.

    3. The server executes the statement, and assigns the PDB-specific role to Tenant1Foot 1 .

    4. The server then connects Conn1 to PDB1, and then returns the corresponding database ID (dbid) and other properties to JDBC.

    5. JDBC notifies UCP and hands Conn1 to Tenant1 for use.

      See Also:

      The multitenant data source for Java white paper posted on Oracle Technology Network:

      http://www.oracle.com/technetwork/database/application-development/index-099369.html



Footnote Legend

Footnote 1: If you are a global user in a PDB, then you cannot perform many tasks without a password-protected role.