}
asenvProps = pr.getProps();
info.setup();
setupLogLevels();
MiniXmlParser parser = new MiniXmlParser(getInfo().getConfigFile(), getInfo().getInstanceName());
String domainName = parser.getDomainName();
if (GFLauncherUtils.ok(domainName)) {
info.setDomainName(domainName);
}
info.setAdminAddresses(parser.getAdminAddresses());
javaConfig = new JavaConfig(parser.getJavaConfig());
setupProfilerAndJvmOptions(parser);
setupUpgradeSecurity();
Map<String, String> realmprops = parser.getAdminRealmProperties();
if (realmprops != null) {
String classname = realmprops.get("classname");
String keyfile = realmprops.get("file");
if ("com.sun.enterprise.security.auth.realm.file.FileRealm".equals(classname)
&& keyfile != null) {
adminFileRealmKeyFile = keyfile;
}
}
secureAdminEnabled = parser.getSecureAdminEnabled();
renameOsgiCache();
setupMonitoring(parser);
sysPropsFromXml = parser.getSystemProperties();
asenvProps.put(INSTANCE_ROOT_PROPERTY, getInfo().getInstanceRootDir().getPath());
// Set the config java-home value as the Java home for the environment,
// unless it is empty or it is already refering to a substitution of
// the environment variable.
String jhome = javaConfig.getJavaHome();
if (GFLauncherUtils.ok(jhome) && !jhome.trim().equals("${" + JAVA_ROOT_PROPERTY + "}")) {
asenvProps.put(JAVA_ROOT_PROPERTY, jhome);
}
debugOptions = getDebug();
parseDebug();
parser.setupConfigDir(getInfo().getConfigDir(), getInfo().getInstallDir());
setLogFilename(parser);
resolveAllTokens();
fixLogFilename();
GFLauncherLogger.addLogFileHandler(logFilename, info);
setJavaExecutable();
setClasspath();
setCommandLine();
setJvmOptions();
logCommandLine();
// if no <network-config> element, we need to upgrade this domain
needsAutoUpgrade = !parser.hasNetworkConfig();
needsManualUpgrade = !parser.hasDefaultConfig();
setupCalledByClients = true;
}