Package oracle.jdbc.xa.client
Class OracleXADataSource
- java.lang.Object
-
- oracle.jdbc.datasource.impl.OracleDataSource
-
- oracle.jdbc.datasource.impl.OracleConnectionPoolDataSource
-
- oracle.jdbc.pool.OracleConnectionPoolDataSource
-
- oracle.jdbc.xa.OracleXADataSource
-
- oracle.jdbc.xa.client.OracleXADataSource
-
- All Implemented Interfaces:
Serializable
,Wrapper
,Referenceable
,CommonDataSource
,ConnectionPoolDataSource
,DataSource
,XADataSource
,OracleCommonDataSource
,OracleConnectionPoolDataSource
,OracleDataSource
,OracleXADataSource
,oracle.jdbc.internal.Monitor
,oracle.jdbc.replay.internal.OracleConnectionPoolDataSource
,oracle.jdbc.replay.internal.OracleDataSource
,oracle.jdbc.replay.internal.OracleXADataSource
,OracleConnectionPoolDataSource
,OracleDataSource
,OracleXADataSource
- Direct Known Subclasses:
OracleXADataSourceImpl
public class OracleXADataSource extends OracleXADataSource
A factory for XAConnection objects. An object that implements the XADataSource interface is typically registered with a JNDI service provider.For optimization purposes, we implemented 2 versions of OracleXADataSource: one for client, and one for server when used in Java Stored Procedures and in EJB. The server-version is only available in 8.1.6 and post-8.1.6 backends. This one is the implementation of OracleXADataSource for client-side usage and works for both pre- and post-8.1.6 RMs.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class oracle.jdbc.xa.OracleXADataSource
useNativeXA
-
Fields inherited from class oracle.jdbc.datasource.impl.OracleDataSource
CHECKSUM_PROPERTY, clientChecksum11203x, clientChecksum12x, connectionProperties, databaseName, dataSourceName, DEFAULT_SERVICE_NAME, description, doneDumpOnMemoryPressure, driver, driverType, ENABLE_AC_SUPPORT_PROPERTY, explicitCachingEnabled, explicitCachingEnabledSet, FAILOVER_RESTORE_AUTO, FAILOVER_RESTORE_LEVEL1, FAILOVER_RESTORE_LEVEL2, FAILOVER_RESTORE_NONE, FAILOVER_RESTORE_PROPERTY, FAILOVER_TYPE_AUTO, FAILOVER_TYPE_PROPERTY, FAILOVER_TYPE_TRANSACTION, IGNORE_AC_CONTEXT_PROPERTY, implicitCachingEnabled, implicitCachingEnabledSet, INITIATION_TIMEOUT_PROPERTY, isAutoACEnabled, isFirstConnection, isOracleDataSource, isReplayInDynamicMode, isStateRestorationAuto, isTransactionReplayEnabled, loginTimeout, logWriter, maxStatements, maxStatementsSet, networkProtocol, password, portNumber, RECONNECT_DELAY_PROPERTY, RECONNECT_RETRIES_PROPERTY, reconnectDelay, reconnectRetries, replayInitiationTimeout, REQUEST_SIZE_LIMIT_PROPERTY, serverName, serviceName, SESSION_STATE_CONSISTENCY_STATIC, SESSION_STATE_PROPERTY, stateRestorationType, tnsEntry, TRACE, url, user
-
Fields inherited from interface oracle.jdbc.replay.OracleDataSource
CONNECTION_PROPERTIES, DATA_SOURCE_NAME, DATABASE_NAME, DESCRIPTION, EXPLICIT_CACHING_ENABLED, IMPLICIT_CACHING_ENABLED, MAX_STATEMENTS, NETWORK_PROTOCOL, PASSWORD, PORT_NUMBER, ROLE_NAME, SERVER_NAME, URL, USER
-
-
Constructor Summary
Constructors Constructor Description OracleXADataSource()
Create an OracleXADataSource instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OracleXAConnectionBuilderImpl
createXAConnectionBuilder()
Creates a new Oracle XA ConnectionBuilder instanceprotected void
debug(Logger logger, Level level, Executable method, String msg)
XAConnection
getXAConnection()
Attempt to establish a database connection.XAConnection
getXAConnection(String userName, String passwd)
Attempt to establish a database connection.XAConnection
getXAConnection(OracleXAConnectionBuilderImpl builder)
-
Methods inherited from class oracle.jdbc.xa.OracleXADataSource
getConnectionDuringExceptionHandling, setURL
-
Methods inherited from class oracle.jdbc.datasource.impl.OracleConnectionPoolDataSource
createPooledConnectionBuilder, getConnection, getConnection, getConnection, getPhysicalConnection, getPhysicalConnection, getPhysicalConnection, getPhysicalConnection, getPhysicalConnection, getPooledConnection, getPooledConnection
-
Methods inherited from class oracle.jdbc.datasource.impl.OracleDataSource
addRefProperties, cleanup, clearDoneDumpOnMemoryPressure, clearReplayStatistics, createConnectionBuilder, enableACAndProxifyIfNecessary, filterConnectionProperties, getConnection, getConnection, getConnectionInitializationCallback, getConnectionNoProxy, getConnectionProperties, getConnectionProperty, getDatabaseName, getDataSourceName, getDescription, getDriverType, getExplicitCachingEnabled, getImplicitCachingEnabled, getLoginTimeout, getLogWriter, getMaxStatements, getMonitorLock, getNetworkProtocol, getParentLogger, getPassword, getPhysicalConnection, getPortNumber, getProxyFactory, getReference, getReplayStatistics, getReplayStatisticsString, getRequestSizeLimit, getRoleName, getServerName, getServiceName, getSystemProperty, getTNSEntryName, getURL, getUser, isWrapperFor, makeURL, registerConnectionInitializationCallback, registerMBean, setConnectionProperties, setConnectionProperty, setDatabaseName, setDataSourceName, setDescription, setDriverType, setExplicitCachingEnabled, setImplicitCachingEnabled, setLoginTimeout, setLogWriter, setMaxStatements, setNetworkProtocol, setPassword, setPortNumber, setRoleName, setServerName, setServiceName, setSingleShardTransactionSupport, setSSLContext, setTNSEntryName, setupACSpecificProperties, setUser, trace, unregisterConnectionInitializationCallback, unregisterMBean, unwrap, updateReplayStatistics
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
getParentLogger
-
Methods inherited from interface javax.sql.ConnectionPoolDataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Methods inherited from interface javax.sql.DataSource
getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
Methods inherited from interface oracle.jdbc.internal.Monitor
acquireCloseableLock, acquireLock, newDefaultLock, releaseLock
-
Methods inherited from interface oracle.jdbc.datasource.OracleCommonDataSource
createShardingKeyBuilder, getConnectionProperties, getConnectionProperty, getDatabaseName, getDataSourceName, getDescription, getNetworkProtocol, getPortNumber, getServerName, getURL, getUser, setConnectionProperties, setConnectionProperty, setDatabaseName, setDataSourceName, setDescription, setNetworkProtocol, setPassword, setPortNumber, setServerName, setSingleShardTransactionSupport, setSSLContext, setUser
-
Methods inherited from interface oracle.jdbc.datasource.OracleConnectionPoolDataSource
createPooledConnectionBuilder
-
Methods inherited from interface oracle.jdbc.replay.OracleConnectionPoolDataSource
getPooledConnection
-
Methods inherited from interface oracle.jdbc.datasource.OracleDataSource
createConnectionBuilder
-
Methods inherited from interface oracle.jdbc.replay.internal.OracleDataSource
clearDoneDumpOnMemoryPressure, getConnectionNoProxy, getProxyFactory, getReplayStatisticsString, getRequestSizeLimit, updateReplayStatistics
-
Methods inherited from interface oracle.jdbc.replay.OracleDataSource
clearReplayStatistics, getConnectionInitializationCallback, getExplicitCachingEnabled, getImplicitCachingEnabled, getMaxStatements, getReplayStatistics, getRoleName, registerConnectionInitializationCallback, setExplicitCachingEnabled, setImplicitCachingEnabled, setMaxStatements, setRoleName, unregisterConnectionInitializationCallback
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Methods inherited from interface javax.sql.XADataSource
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter
-
-
-
-
Constructor Detail
-
OracleXADataSource
public OracleXADataSource() throws SQLException
Create an OracleXADataSource instance.- Throws:
SQLException
- if error occurs while creating an object
-
-
Method Detail
-
getXAConnection
public XAConnection getXAConnection() throws SQLException
Attempt to establish a database connection.- Specified by:
getXAConnection
in interfaceOracleXADataSource
- Specified by:
getXAConnection
in interfaceXADataSource
- Specified by:
getXAConnection
in classOracleXADataSource
- Returns:
- an Connection to the database
- Throws:
SQLException
- if a database-access error occurs.
-
getXAConnection
public XAConnection getXAConnection(String userName, String passwd) throws SQLException
Attempt to establish a database connection.- Specified by:
getXAConnection
in interfaceOracleXADataSource
- Specified by:
getXAConnection
in interfaceXADataSource
- Specified by:
getXAConnection
in classOracleXADataSource
- Parameters:
userName
- the database user on whose behalf the Connection is madepasswd
- the user's password- Returns:
- an XAConnection encapsulating a connection to the database
- Throws:
SQLException
- if a database-access error occurs.
-
getXAConnection
public XAConnection getXAConnection(OracleXAConnectionBuilderImpl builder) throws SQLException
- Throws:
SQLException
-
createXAConnectionBuilder
public OracleXAConnectionBuilderImpl createXAConnectionBuilder()
Creates a new Oracle XA ConnectionBuilder instance- Specified by:
createXAConnectionBuilder
in interfaceOracleXADataSource
- Specified by:
createXAConnectionBuilder
in interfaceXADataSource
- Overrides:
createXAConnectionBuilder
in classOracleXADataSource
- Returns:
- The XA ConnectionBuilder instance that was created
-
debug
protected void debug(Logger logger, Level level, Executable method, String msg)
- Overrides:
debug
in classoracle.jdbc.datasource.impl.OracleDataSource
-
-