Class 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.

    The following example illustrates the use of this data source to create a JDBC XAConnection:

      
        oracle.jdbc.xa.client.OracleXADataSource oxads =
          new oracle.jdbc.xa.client.OracleXADataSource();
        oxads.setURL("jdbc:oracle:thin:@//dbhost:dbport/dbservice");
        oxads.setUser("User");
        oxads.setPassword("Passwd");
        oxads.setConnectionProperty("connProp1", "value1");
        oxads.setConnectionProperty("connProp2", "value2");
     
        javax.sql.XAConnection xaconn = oxads.getXAConnection();
      
      
    See Also:
    Serialized Form