run = r;
cmdService = c;
this.oracleHome = oracleHome;
this.oracleSid = oracleSid;
OracleAgent oracleAgent = null;
this.serverMachines = serverMachines;
try {
// start OracleAgents on server machines
for (int i = 0; i < serverMachines.length; i++) {
logger.fine("Using CmdService to start " + ORACLE_AGENT + " on " + serverMachines[i]);
cmdService.startAgent(serverMachines[i], OracleAgentImpl.class, ORACLE_AGENT);
Thread.sleep(5000);
// connect to oracleAgent
String s = ORACLE_AGENT + "@" + serverMachines[i];
oracleAgent = (OracleAgent) cmdService.getRegistry().getService(s);
if (oracleAgent == null) {
logger.severe("Failed to connect to " + s);
} else {
logger.fine("Connected to " + s);
oracleAgent.configure(run, oracleHome, oracleSid, allConfigs);
logger.info("Configured " + s);
allAgents.put(serverMachines[i], oracleAgent);
}
}
} catch (Exception e) {