final RepGroupImpl group = RepGroupDB.getGroup(envHome);
if (createEnv) {
printUsage("Environment exists:" + envHome +
"but -createEnv was specified.");
}
final RepNodeImpl node = group.getNode(nodeName);
if (node == null) {
if (! createNode) {
printUsage("The node:" + nodeName +
" is not a member of the group:" + group +
". Use -createNode to create a new one.");
}
} else {
/* Node exists, check arguments if any. */
if (groupName == null) {
groupName = group.getName();
} else if (!groupName.equals(group.getName())) {
printUsage("-groupname:" + groupName +
", does match the name:" + group.getName() +
" in the environment.");
}
if (hostPort == null) {
hostPort = node.getHostPortPair();
} else if (!hostPort.equals(node.getHostPortPair())) {
printUsage("-hostPort:" + hostPort +
", does match the hostPort:" +
node.getHostPortPair() +
" in the environment.");
}
}
} catch (EnvironmentNotFoundException enf) {
if (!createEnv) {