if ( logger.isInfoEnabled() ) {
logger.info( " Shutting down GRID! " + id );
}
try {
WhitePages wp = get( WhitePages.class, false );
if ( wp != null ) {
for ( String nodeId : localNodes.keySet() ) {
GridNode node = localNodes.get( nodeId );
if( ! node.isLocalProxy() ) {
wp.remove( nodeId );
}
if ( ! node.isDisposed() ) {
node.dispose();
}
}
wp.dispose();
}
} catch ( Throwable t ) {
logger.error( " Grid couldn't unregister all local nodes " + t.getMessage(), t );
} finally {
SocketService socketService = get( SocketService.class );