Class OracleDataSourceImpl

java.lang.Object
oracle.jdbc.datasource.impl.OracleDataSource
oracle.jdbc.replay.OracleDataSourceImpl
All Implemented Interfaces:
Serializable, Wrapper, Referenceable, CommonDataSource, DataSource, OracleCommonDataSource, OracleDataSource, oracle.jdbc.diagnostics.Diagnosable, oracle.jdbc.diagnostics.PropertyChangeListener, oracle.jdbc.internal.Monitor, oracle.jdbc.replay.internal.OracleDataSource, OracleDataSource

public class OracleDataSourceImpl extends OracleDataSource
JDBC Data Source that supports transparent JDBC operation replay upon a failover.

For data source creation using Oracle JDBC driver 21c and higher versions, we strongly recommend that your code use oracle.jdbc.datasource.impl.OracleDataSource, instead of this class, which has become a thin wrapper of the former class and will be gradually phased out.

For data source creation using Oracle JDBC driver 19c and earlier versions, you can still use this class.

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

  
    oracle.jdbc.datasource.OracleDataSource ods =
      new oracle.jdbc.datasource.impl.OracleDataSource();
    ods.setURL("jdbc:oracle:thin:@//dbhost:dbport/dbservice");
    ods.setUser("User");
    ods.setPassword("Passwd");
    ods.setConnectionProperty("connProp1", "value1");
    ods.setConnectionProperty("connProp2", "value2");
 
    Connection conn = ods.getConnection();
  
  

The following example illustrates the use of a connection obtained from this data source for Application Continuity protection:

  
    oracle.jdbc.OracleConnection conn =
      (oracle.jdbc.OracleConnection) ods.getConnection();
    conn.beginRequest();
    ...... // JDBC calls protected by AC
    conn.endRequest();
  
  

See Also: