{
log.debug( "server found" );
}
// Successful connection to the remote server.
remoteService = ( IRemoteCacheService ) obj;
remoteWatch = new RemoteCacheWatchRepairable();
remoteWatch.setCacheWatch( ( IRemoteCacheObserver ) obj );
}
catch ( Exception ex )
{
// Failed to connect to the remote server.
// Configure this RemoteCacheManager instance to use the "zombie" services.
log.error( ex.getMessage() );
remoteService = new ZombieRemoteCacheService();
remoteWatch = new RemoteCacheWatchRepairable();
remoteWatch.setCacheWatch( new ZombieRemoteCacheWatch() );
// Notify the cache monitor about the error, and kick off the recovery process.
RemoteCacheClusterMonitor.getInstance().notifyError();
}