ieContext.msgCnt = 0;
ieContext.initNumLostConnections = broker.getNumLostConnections();
ieContext.initWindow = initWindow;
// Send start message to the peer
InitializeTargetMsg initTargetMsg = new InitializeTargetMsg(
serviceID, serverID, serverToInitialize, serverRunningTheTask,
ieContext.entryCount, initWindow);
broker.publish(initTargetMsg);
// Wait for all servers to be ok
waitForRemoteStartOfInit();
// Servers that left in the list are those for which we could not test
// that they have been successfully initialized.
if (!ieContext.failureList.isEmpty())
{
throw new DirectoryException(
ResultCode.OTHER,
ERR_INIT_NO_SUCCESS_START_FROM_SERVERS.get(
ieContext.failureList.toString()));
}
exportBackend(new BufferedOutputStream(new ReplOutputStream(this)));
// Notify the peer of the success
DoneMsg doneMsg = new DoneMsg(serverID, initTargetMsg.getDestination());
broker.publish(doneMsg);
}
catch(DirectoryException exportException)
{