Oracle10g JDBC

oracle.jdbc.xa.client
Class OracleXADataSource

java.lang.Object
  extended byoracle.jdbc.pool.OracleDataSource
      extended byoracle.jdbc.pool.OracleConnectionPoolDataSource
          extended byoracle.jdbc.xa.OracleXADataSource
              extended byoracle.jdbc.xa.client.OracleXADataSource
All Implemented Interfaces:
javax.sql.ConnectionPoolDataSource, javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable, javax.sql.XADataSource

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
static java.lang.String BUILD_DATE
           
static boolean PRIVATE_TRACE
           
static boolean TRACE
           
 
Fields inherited from class oracle.jdbc.pool.OracleDataSource
isOracleDataSource
 
Constructor Summary
OracleXADataSource()
          Create an OracleXADataSource instance.
 
Method Summary
 javax.sql.XAConnection getXAConnection()
          Attempt to establish a database connection.
 javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String passwd)
          Attempt to establish a database connection.
 
Methods inherited from class oracle.jdbc.pool.OracleConnectionPoolDataSource
getPooledConnection, getPooledConnection
 
Methods inherited from class oracle.jdbc.pool.OracleDataSource
close, getConnection, getConnection, getConnection, getConnection, getConnectionCacheName, getConnectionCacheProperties, getConnectionCachingEnabled, getConnectionProperties, getDatabaseName, getDataSourceName, getDescription, getDriverType, getExplicitCachingEnabled, getFastConnectionFailoverEnabled, getImplicitCachingEnabled, getLoginTimeout, getLogWriter, getMaxStatements, getNetworkProtocol, getPortNumber, getReference, 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.ConnectionPoolDataSource
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

OracleXADataSource

public OracleXADataSource()
                   throws java.sql.SQLException
Create an OracleXADataSource instance.

Throws:
java.sql.SQLException - if error occurs while creating an object
Method Detail

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws java.sql.SQLException
Attempt to establish a database connection.

Specified by:
getXAConnection in interface javax.sql.XADataSource
Specified by:
getXAConnection in class OracleXADataSource
Returns:
an Connection to the database
Throws:
java.sql.SQLException - if a database-access error occurs.

getXAConnection

public javax.sql.XAConnection getXAConnection(java.lang.String user,
                                              java.lang.String passwd)
                                       throws java.sql.SQLException
Attempt to establish a database connection.

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

Oracle10g JDBC

Copyright © 1998,2004, Oracle. All rights reserved