@ FFDCIgnore ( NamingException . class ) private void closeContextPool ( List < TimedDirContext > contexts ) { final String METHODNAME = "closeContextPool" ; if ( contexts != null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHODNAME + " Context pool being closed by " + Thread . currentThread ( ) + ", Context pool size=" + contexts . size ( ) ) ; } for ( int i = 0 ; i < contexts . size ( ) ; i ++ ) { TimedDirContext context = contexts . get ( i ) ; try { context . close ( ) ; iLiveContexts -- ; } catch ( NamingException e ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , METHODNAME + " Can not close LDAP connection: " + e . toString ( true ) ) ; } } } }
Close the context pool .