protected void cleanupAndDestroyAllFreeConnections ( ) { // This method is called within a synchronize block if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "cleanupAndDestroyAllFreeConnections" ) ; } int mcWrapperListIndex = mcWrapperList . size ( ) - 1 ; for ( int i = mcWrapperListIndex ; i >= 0 ; -- i ) { MCWrapper mcw = ( MCWrapper ) mcWrapperList . remove ( i ) ; mcw . setPoolState ( 0 ) ; pm . totalConnectionCount . decrementAndGet ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Calling cleanup and destroy on MCWrapper " + mcw ) ; } cleanupAndDestroyMCWrapper ( mcw ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( this , tc , "cleanupAndDestroyAllFreeConnections" ) ; } }
During server shutdown try to cleanup and destroy the managed connections nicely . This method should only be called during server server shutdown .