Oracle10g JDBC

oracle.jdbc.pool
Class OracleXAConnectionCacheImpl

java.lang.Object
  extended byoracle.jdbc.pool.OracleDataSource
      extended byoracle.jdbc.pool.OracleConnectionCacheImpl
          extended byoracle.jdbc.pool.OracleXAConnectionCacheImpl
All Implemented Interfaces:
javax.sql.DataSource, OracleConnectionCache, javax.naming.Referenceable, java.io.Serializable, javax.sql.XADataSource

public class OracleXAConnectionCacheImpl
extends OracleConnectionCacheImpl
implements javax.sql.XADataSource, java.io.Serializable

See Also:
Serialized Form

Field Summary
static java.lang.String BUILD_DATE
           
static boolean PRIVATE_TRACE
           
static boolean TRACE
           
 
Fields inherited from class oracle.jdbc.pool.OracleConnectionCacheImpl
DEFAULT_FIXED_WAIT_IDLE_TIME, DYNAMIC_SCHEME, FIXED_RETURN_NULL_SCHEME, FIXED_WAIT_SCHEME, ORAERROR_END_OF_FILE_ON_COM_CHANNEL, ORAERROR_IMMEDIATE_SHUTDOWN_IN_PROGRESS, ORAERROR_INIT_SHUTDOWN_IN_PROGRESS, ORAERROR_NET_IO_EXCEPTION, ORAERROR_NOT_CONNECTED_TO_ORACLE, ORAERROR_ORACLE_NOT_AVAILABLE, ORAERROR_SHUTDOWN_IN_PROGRESS_NO_CONN
 
Fields inherited from class oracle.jdbc.pool.OracleDataSource
isOracleDataSource
 
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
 void closeActualConnection(javax.sql.PooledConnection xac)
           Close the XAConnection
 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.
 
Methods inherited from class oracle.jdbc.pool.OracleConnectionCacheImpl
clearWarnings, close, closeConnections, closePooledConnection, closeSingleConnection, getActiveSize, getCacheFixedWaitIdleTime, getCacheFixedWaitTimeout, getCacheInactivityTimeout, getCacheScheme, getCacheSize, getCacheTimeToLiveTimeout, getConnection, getConnection, getConnectionCleanupInterval, getConnectionErrorCodes, getMaxLimit, getMinLimit, getReference, getStmtCacheSize, getThreadWakeUpInterval, getWarnings, isFatalConnectionError, reusePooledConnection, setCacheFixedWaitIdleTime, setCacheFixedWaitTimeout, setCacheInactivityTimeout, setCacheScheme, setCacheScheme, setCacheTimeToLiveTimeout, setConnectionCleanupInterval, setConnectionErrorCodes, setConnectionPoolDataSource, setMaxLimit, setMinLimit, setStmtCacheSize, setStmtCacheSize, setThreadWakeUpInterval
 
Methods inherited from class oracle.jdbc.pool.OracleDataSource
getConnection, getConnection, getConnectionCacheName, getConnectionCacheProperties, getConnectionCachingEnabled, getConnectionProperties, getDatabaseName, getDataSourceName, getDescription, getDriverType, getExplicitCachingEnabled, getFastConnectionFailoverEnabled, getImplicitCachingEnabled, getLoginTimeout, getLogWriter, getMaxStatements, getNetworkProtocol, getPortNumber, getServerName, getServiceName, getTNSEntryName, getURL, getUser, setConnectionCacheName, setConnectionCacheProperties, setConnectionCachingEnabled, setConnectionProperties, setDatabaseName, setDataSourceName, setDescription, setDriverType, setExplicitCachingEnabled, setFastConnectionFailoverEnabled, setImplicitCachingEnabled, setLoginTimeout, setLogWriter, setMaxStatements, setNetworkProtocol, setPassword, setPortNumber, setServerName, setServiceName, setTNSEntryName, setURL, setUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.XADataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 
Methods inherited from interface javax.sql.DataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
 

Field Detail

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

PRIVATE_TRACE

public static final boolean PRIVATE_TRACE
See Also:
Constant Field Values

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values
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.

Specified by:
getXAConnection in interface javax.sql.XADataSource
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.

Specified by:
getXAConnection in interface javax.sql.XADataSource
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.

closeActualConnection

public void closeActualConnection(javax.sql.PooledConnection xac)
                           throws java.sql.SQLException

Close the XAConnection

Throws:
java.sql.SQLException

Oracle10g JDBC

Copyright © 1998,2004, Oracle. All rights reserved