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();
}
...