nodeHost = theNode.getNodeHost();
nodeDir = theNode.getNodeDirAbsolute();
installDir = theNode.getInstallDir();
// First, update domain.xml by calling _register-instance
CommandInvocation ci = cr.getCommandInvocation("_register-instance", report);
ParameterMap map = new ParameterMap();
map.add("node", node);
map.add("config", configRef);
map.add("cluster", clusterName);
if (lbEnabled != null) {
map.add("lbenabled", lbEnabled.toString());
}
if (!checkPorts) {
map.add("checkports", "false");
}
if (StringUtils.ok(portBase)) {
map.add("portbase", portBase);
}
map.add("systemproperties", systemProperties);
map.add("DEFAULT", instance);
ci.parameters(map);
ci.execute();
if (report.getActionExitCode() != ActionReport.ExitCode.SUCCESS
&& report.getActionExitCode() != ActionReport.ExitCode.WARNING) {
// If we couldn't update domain.xml then stop!
return;
}
registerInstanceMessage = report.getMessage();
// if nodehost is localhost and installdir is null and config node, update config node
// so installdir is product root. see register-instance above
if (theNode.isLocal() && installDir == null) {
ci = cr.getCommandInvocation("_update-node", report);
map = new ParameterMap();
map.add("installdir", "${com.sun.aas.productRoot}");
map.add("type", "CONFIG");
map.add("DEFAULT", theNode.getName());
ci.parameters(map);
ci.execute();
if (report.getActionExitCode() != ActionReport.ExitCode.SUCCESS
&& report.getActionExitCode() != ActionReport.ExitCode.WARNING) {
// If we couldn't update domain.xml then stop!