protected void removeParkedConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "removeParkedConnection" ) ; } // boolean errorOccured = false; if ( pm . parkedMCWrapper != null ) { // Only attempt to cleanup and destroy the parked MC if one exists... synchronized ( pm . parkedConnectionLockObject ) { if ( pm . parkedMCWrapper != null ) { cleanupAndDestroyMCWrapper ( pm . parkedMCWrapper ) ; // try { // pm.parkedMCWrapper.cleanup(); // } // catch (Exception exn1) // errorOccured = true; // if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){ // Tr.debug(this, tc,"parked MCWrapper cleanup failed, datasource: " + gConfigProps.pmiName); // } // com.ibm.ws.ffdc.FFDCFilter.processException( // exn1, // "com.ibm.ejs.j2c.poolmanager.FreePool.removeParkedConnection", // this); // } // // try { // pm.parkedMCWrapper.destroy(); // no PMI for this connection. // } catch (Exception exn1) // errorOccured = true; // if(TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()){ // Tr.debug(this, tc,"parked MCWrapper destroy failed, datasource: " + gConfigProps.pmiName); // } // com.ibm.ws.ffdc.FFDCFilter.processException( // exn1, // "com.ibm.ejs.j2c.poolmanager.FreePool.removeParkedConnection", // this); // } pm . parkedMCWrapper = null ; // Reset value to true to create a new parked connection. pm . createParkedConnection = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Reset the createParkedConnection flag to recreate a new parked connection" ) ; } } } // end sync } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( this , tc , "removeParkedConnection" ) ; } }
Remove the parked managed connection . This method should only be called if do not have SmartHandleSupport in effect . The PoolManager controls the SmartHandleSupported flag so we have to trust the PM not to call this method when smart handles is in effect .