Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


oracle.jdbc.xa
Class OracleXADataSource

java.lang.Object
  extended by oracle.jdbc.pool.OracleDataSource
      extended by oracle.jdbc.pool.OracleConnectionPoolDataSource
          extended by oracle.jdbc.xa.OracleXADataSource

All Implemented Interfaces:
Serializable, Wrapper, Referenceable, CommonDataSource, ConnectionPoolDataSource, DataSource, XADataSource
Direct Known Subclasses:
OracleXADataSource

public abstract class OracleXADataSource
extends OracleConnectionPoolDataSource
implements XADataSource

A factory for XAConnection objects. An object that implements the XADataSource interface is typically registered with a JNDI service provider.

See Also:
Serialized Form

Field Summary
static boolean TRACE
           
protected  boolean useNativeXA
           

 

Fields inherited from class oracle.jdbc.pool.OracleDataSource
cacheManager, connCacheName, connCacheProperties, connCachingEnabled, connectionProperties, databaseName, dataSourceName, description, driver, driverType, explicitCachingEnabled, explicitCachingEnabledSet, fastConnFailover, implicitCachingEnabled, implicitCachingEnabledSet, isOracleDataSource, loginTimeout, logWriter, maxStatements, maxStatementsSet, networkProtocol, odsCache, onsConfigStr, password, portNumber, serverName, serviceName, tnsEntry, url, user

 

Constructor Summary
OracleXADataSource()
           Create an OracleXADataSource instance.

 

Method Summary
protected  void copy(OracleDataSource ds)
           
protected  oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()
           
abstract  XAConnection getXAConnection()
          Attempt to establish a database connection.
abstract  XAConnection getXAConnection(String user, String passwd)
          Attempt to establish a database connection.
 void setURL(String url)
          Set the URL from which connections have to be obtained.

 

Methods inherited from class oracle.jdbc.pool.OracleConnectionPoolDataSource
getPhysicalConnection, getPhysicalConnection, getPhysicalConnection, getPooledConnection, getPooledConnection

 

Methods inherited from class oracle.jdbc.pool.OracleDataSource
addRefProperties, close, getConnection, getConnection, getConnection, getConnection, getConnectionCacheName, getConnectionCacheProperties, getConnectionCachingEnabled, getConnectionProperties, getDatabaseName, getDataSourceName, getDescription, getDriverType, getExplicitCachingEnabled, getFastConnectionFailoverEnabled, getImplicitCachingEnabled, getLoginTimeout, getLogWriter, getMaxStatements, getNetworkProtocol, getONSConfiguration, getParentLogger, getPassword, getPhysicalConnection, getPortNumber, getReference, getServerName, getServiceName, getTNSEntryName, getURL, getUser, isWrapperFor, setConnectionCacheName, setConnectionCacheProperties, setConnectionCachingEnabled, setConnectionProperties, setDatabaseName, setDataSourceName, setDescription, setDriverType, setExplicitCachingEnabled, setFastConnectionFailoverEnabled, setImplicitCachingEnabled, setLoginTimeout, setLogWriter, setMaxStatements, setNetworkProtocol, setONSConfiguration, setPassword, setPortNumber, setServerName, setServiceName, setTNSEntryName, setUser, trace, unwrap

 

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
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter

 

Field Detail

useNativeXA

protected boolean useNativeXA

TRACE

public static final boolean TRACE
See Also:
Constant Field Values

Constructor Detail

OracleXADataSource

public OracleXADataSource()
                   throws SQLException

Create an OracleXADataSource instance.

Throws:
SQLException - if error occurs while creating an object

Method Detail

getXAConnection

public abstract XAConnection getXAConnection()
                                      throws SQLException

Attempt to establish a database connection.

Specified by:
getXAConnection in interface XADataSource
Returns:
a Connection to the database
Throws:
SQLException - if a database-access error occurs.

getXAConnection

public abstract XAConnection getXAConnection(String user,
                                             String passwd)
                                      throws SQLException

Attempt to establish a database connection.

Specified by:
getXAConnection in interface XADataSource
Parameters:
user - the database user on whose behalf the Connection is being made
password - the user's password
Returns:
a Connection to the database
Throws:
SQLException - if a database-access error occurs.

setURL

public void setURL(String url)
Description copied from class: OracleDataSource
Set the URL from which connections have to be obtained. If URL is set all other properties like databasename, servername, portNumber, network protocol, tnsentry, and driver Type will be ignored.
Overrides:
setURL in class OracleDataSource
Parameters:
url - URL to be set.

copy

protected void copy(OracleDataSource ds)
             throws SQLException
Overrides:
copy in class OracleDataSource
Throws:
SQLException

getConnectionDuringExceptionHandling

protected oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()
Overrides:
getConnectionDuringExceptionHandling in class OracleDataSource

Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


Copyright © 2008, 2014, Oracle and/or its affiliates. All rights reserved.