Configuring Hybrid Data Pipeline for JDBC
:
JDBC extensions
:
JDBC Wrapper methods to access JDBC extensions
Try Now
JDBC Wrapper methods to access JDBC extensions
The Wrapper methods allow an application to access vendor-specific classes. The following example shows how to access the DataDirect-specific
ExtConnection
class using the Wrapper methods:
ExtStatementPoolMonitor monitor = null;
Class<ExtConnection> cls = ExtConnection.class;
if (con.isWrapperFor(cls)) {
ExtConnection extCon = con.unwrap(cls);
extCon.setClientUser("Joe Smith");
monitor = extCon.getStatementPoolMonitor();
}...
if(monitor != null) {
long hits = monitor.getHitCount();
long misses = monitor.getMissCount();
}...