"false");
boolean bRendezvous = new Boolean(rendezvous).booleanValue();
boolean bLocalRendezvous = new Boolean(localRendezvous).booleanValue();
if (bRendezvous || bLocalRendezvous) {
boolean bDidRendezvous = false;
NodeAgent agent = new NodeAgent(config);
// We need to disable any logging emitted by the NodeAgent unless -DDebug is set.
Logger naLogger = agent.getLogger();
Level naLevel = naLogger.getLevel();
if (!CLILogger.isDebug()) {
naLogger.setLevel(Level.OFF);
} else {
naLogger.setLevel(Level.FINEST);
}
try {
IdentityManager.setUser((String)config.get(AgentConfig.K_DAS_USER));
IdentityManager.setPassword((String)config.get(AgentConfig.K_DAS_PASSWORD));
IdentityManager.setMasterPassword((String)config.get(AgentConfig.K_MASTER_PASSWORD));
if (bRendezvous) {
try {
agent.rendezvousWithDAS();
} catch (Exception ex) {
//An IOException indicates that the DAS is not reachable and as such
//should not be considered an error.
if (!(ex instanceof IOException)) {
throw ex;
} else {
bDidRendezvous = false;
}
}
}
if (!bDidRendezvous && bLocalRendezvous) {
agent.localRendezvousWithDAS();
}
} finally {
//Re-establish the old debugging levels
naLogger.setLevel(naLevel);
}