oracle.jdbc.xa.client
Class OracleXADataSource
oracle.jdbc.xa.OracleXADataSource
|
+--oracle.jdbc.xa.client.OracleXADataSource
- 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.
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. |
OracleXADataSource
public OracleXADataSource()
throws java.sql.SQLException
- Create an OracleXADataSource instance.
- Throws:
- java.sql.SQLException - if error occurs while creating an object
getXAConnection
public javax.sql.XAConnection getXAConnection()
throws java.sql.SQLException
- Attempt to establish a database connection.
- Returns:
- an Connection to the database
- Throws:
- java.sql.SQLException - if a database-access error occurs.
- Overrides:
- getXAConnection in class OracleXADataSource
getXAConnection
public javax.sql.XAConnection getXAConnection(java.lang.String user,
java.lang.String passwd)
throws java.sql.SQLException
- Attempt to establish a database connection.
- Parameters:
user
- the database user on whose behalf the Connection is being madepasswd
- the user's password- Returns:
- a Connection to the database
- Throws:
- java.sql.SQLException - if a database-access error occurs.
- Overrides:
- getXAConnection in class OracleXADataSource