/** * Associates connection handle with new managed connection. * * @param newMc new managed connection */ public void associateConnection(MuleManagedConnection newMc) throws ResourceException { checkIfValid(); // dissociate handle from current managed connection managedConnection.removeConnection(this); // associate handle with new managed connection newMc.addConnection(this); managedConnection = newMc; }
/** Closes the connection. */ public void close() throws ResourceException { if (managedConnection == null) { return; // connection is already closed } managedConnection.removeConnection(this); // Send a close event to the App Server managedConnection.fireCloseEvent(this); managedConnection = null; }