if (connection == null) {
String i18nMsg = localStrings.getString(
"jdbc.conn_handle_null");
throw new ResourceException(i18nMsg);
}
ConnectionHolder ch = (ConnectionHolder) connection;
com.sun.gjc.spi.ManagedConnection mc = ch.getManagedConnection();
isClean = false;
ch.associateConnection(actualConnection, this);
/**
* The expectation from the above method is that the connection holder
* replaces the actual sql connection it holds with the sql connection
* handle being passed in this method call. Also, it replaces the reference
* to the ManagedConnection instance with this ManagedConnection instance.
* Any previous statements and result sets also need to be removed.
*/
ch.setActive(true);
incrementCount();
//mc will be null in case we are lazily associating
if (mc != null) {
mc.decrementCount();