oracle.jdbc.pool
Class OracleXAConnectionCacheImpl

oracle.jdbc.pool.OracleXAConnectionCacheImpl

public class OracleXAConnectionCacheImpl


Constructor Summary
OracleXAConnectionCacheImpl()
           Default Constructor.
OracleXAConnectionCacheImpl(javax.sql.ConnectionPoolDataSource cpds)
           Create an OracleXAConnectionCacheImpl with the given ConnectionPoolDataSource from which XAConnections have to be created.
 
Method Summary
 boolean getNativeXA()
          Return the nativeXA flag setting on this data source.
 javax.sql.XAConnection getXAConnection()
          Attempt to get a physical XAConnection from the Cache.
 javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String passwd)
          Attempt to get a physical XAConnection from the Cache.
 void setNativeXA(boolean nativeXA)
          Set the nativeXA flag to the given value.
 

Constructor Detail

OracleXAConnectionCacheImpl

public OracleXAConnectionCacheImpl()
                            throws java.sql.SQLException

Default Constructor. Should have an explicit call to set the URL, User, Password and other DataSource details. A ConnectionPoolDataSource is created with these options from which XAConnections can be created.

Throws:
java.sql.SQLException - error creating Cache

OracleXAConnectionCacheImpl

public OracleXAConnectionCacheImpl(javax.sql.ConnectionPoolDataSource cpds)
                            throws java.sql.SQLException

Create an OracleXAConnectionCacheImpl with the given ConnectionPoolDataSource from which XAConnections have to be created. In this case, url, user name, password, and other DataSource properties set on this Cache are ignored.

Parameters:
cpds - a datasource from which the Cache can create XAConnections.
Throws:
java.sql.SQLException - error creating Cache
Method Detail

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws java.sql.SQLException
Attempt to get a physical XAConnection from the Cache. May return null depending on the caching schemes selected.

Returns:
XAConnection A physical XAConnection Object.
Throws:
java.sql.SQLException - error creating XAConnection Object.

getXAConnection

public javax.sql.XAConnection getXAConnection(java.lang.String user,
                                              java.lang.String passwd)
                                       throws java.sql.SQLException
Attempt to get a physical XAConnection from the Cache. May return null depending on the caching schemes selected.

Parameters:
user - User name for the connection.
passwd - Password for user.
Returns:
XAConnection A physical XAConnection Object.
Throws:
java.sql.SQLException - error creating XAConnection Object.

getNativeXA

public boolean getNativeXA()
Return the nativeXA flag setting on this data source.

Returns:
The nativeXA flag setting on this data source.

setNativeXA

public void setNativeXA(boolean nativeXA)
Set the nativeXA flag to the given value.

Parameters:
nativeXA - The nativeXA flag to be set.