The Replay data source (oracle.jdbc.replay.OracleDataSource
) is a JDBC-thin data source that Application Continuity requires for Java. This data source serves as the connection factory that produces new physical JDBC connections, for both Universal Connection Pool and Oracle WebLogic Server Active GridLink for Oracle RAC data sources. The JDBC replay driver maintains a history of calls during a client conversation with Oracle Database 12c, in collaboration with Oracle Database. Following any outage of the session caused by a loss of database service, planned or unplanned, under the direction of the database, the JDBC replay driver attempts to rebuild the non-transactional and transactional database session states, so that the outage appears as a delayed execution.
To use Application Continuity for Java and the JDBC replay driver, you must use an Oracle Database 12c client and connect to an Oracle Database 12c database. Application Continuity for Java is supported in the following configurations:
JDBC applications using Oracle JDBC Replay data source and using neither Universal Connection Pool or Oracle WebLogic Server Active GridLink—typical third-party, JDBC-based connection pools
JDBC applications using Universal Connection Pool data sources—standalone or third-party application servers configured to use a Universal Connection Pool data source
JDBC applications using only Oracle WebLogic Server Active GridLink but not Universal Connection Pool data sources—typical Oracle WebLogic Server J2EE cases
To configure JDBC-thin clients to use the JDBC Replay Driver:
Ensure that you are using an application that is certified for replay.
Use SRVCTL to create a service for use by the application, if one does not already exist. Set the -failovertype
parameter to TRANSACTION
and the -commit_outcome
parameter to TRUE
for this service.
See Also:
"Creating Services for Application Continuity and Transaction Guard" for more information about creating services.
Configure the connection element using the replayDataSource
object, as shown in the following example:
replayDataSource rds = PoolDataSourceFactory.getreplayDataSource(); rds.setConnnectionPoolName("replayExample"); rds.setONSConfiguration("nodes=racnode1:4200,racnode2:4200"); rds.setFastConnectionFailoverEnabled(true); rds.setConnectionFactoryClassName("oracle.jdbc.replay.OracleDataSource"); Connection conn = replayDataSource.getConnection();
When connecting to the database, use a URL that can access all instances offering the service.
See Also:
"Configuring FCF for JDBC/OCI and JDBC-Thin Driver Clients" for information about configuring FAN/FCF
Oracle Database JDBC Developer's Guide for information about configuring Transaction Guard without enabling Application Continuity