threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(Util.RESOLVE_THREAD_POOL_SIZE);
threadPool.setThreadFactory(new TaskThreadFactory());
observer.setThreadPoolExecutors(threadPool);
}
VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
// In some cases the execd spool dir does not get substituted
idata.setVariable(VAR_EXECD_SPOOL_DIR, vs.substituteMultiple(idata.getVariable(VAR_EXECD_SPOOL_DIR), null));
// cfg.db.spooling.dir
String spoolingDir = "";
if (idata.getVariable(VAR_SPOOLING_METHOD).equals("berkeleydb")) {
spoolingDir = idata.getVariable(VAR_DB_SPOOLING_DIR_BDB);
} else {
spoolingDir = idata.getVariable(VAR_DB_SPOOLING_DIR_BDBSERVER);
}
idata.setVariable(VAR_DB_SPOOLING_DIR, vs.substituteMultiple(spoolingDir, null));
// Substitute the variables in Host.State tooltips
String key = "";
String value = "";
Host.State.localizedTexts.clear();
if (idata.langpack != null) {
if (isExpressInst) {
idata.setVariable("tooltip.hint", idata.langpack.getString("express.mode.tooltip.hint"));
} else {
idata.setVariable("tooltip.hint", "");
}
Set<String> keys = idata.langpack.keySet();
for (Iterator<String> it = keys.iterator(); it.hasNext();) {
key = it.next();
value = vs.substituteMultiple((String) idata.langpack.get(key), null);
if (key.startsWith(LANGID_PREFIX_STATE)) {
Host.State.localizedTexts.put(key, value);
}
}
// override the tooltip for perm_execd_spool_dir state dependig in the mode
if (isExpressInst) {
value = vs.substituteMultiple((String) idata.langpack.get("state.perm_execd_spool_dir.tooltip.global"), null);
} else {
value = vs.substituteMultiple((String) idata.langpack.get("state.perm_execd_spool_dir.tooltip.local"), null);
}
Host.State.localizedTexts.put("state.perm_execd_spool_dir.tooltip", value);
}
// Initialize the table(s) with the qmaster and the Berkeley DB host if it's necessary
if (true) {
try {
boolean isQmasterExist = HostSelectionTableModel.getQmasterHost() != null;
boolean isBdbExist = HostSelectionTableModel.getBdbHost() != null;
enablePrevButton(false);
ArrayList<String> host = new ArrayList<String>();
Properties prop = new Properties();
String arch = "";
String message = "";
if (isQmasterInst && !isQmasterExist) {
if (!idata.getVariable(VAR_QMASTER_HOST).equals("")) {
host.add(idata.getVariable(VAR_QMASTER_HOST));
resolveHosts(Host.Type.HOSTNAME, host, true, false, (isShadowdInst == true) ? true : false, false, true, true, idata.getVariable(VAR_EXECD_SPOOL_DIR));
if (HostSelectionTableModel.getQmasterHost() == null) {
try {
arch = lists.get(0).get(0).getArchitecture();
} finally {
prop.setProperty(PARAMETER_1, arch);
}
if (!arch.equals("")) {
vs = new VariableSubstitutor(prop);
message = vs.substituteMultiple(idata.langpack.getString("warning.qmaster.arch.unsupported.message"), null);
emitWarning(idata.langpack.getString("installer.warning"), message);
}
}
}
}
host.clear();
if (isBdbInst && !isBdbExist) {
if (idata.getVariable(VAR_DB_SPOOLING_SERVER).equals("")) {
host.add(Host.localHostName); // TODO localhost or qmaster host ?
} else {
host.add(idata.getVariable(VAR_DB_SPOOLING_SERVER));
}
resolveHosts(Host.Type.HOSTNAME, host, false, true, false, false, false, false, idata.getVariable(VAR_EXECD_SPOOL_DIR));
if (HostSelectionTableModel.getBdbHost() == null) {
try {
arch = lists.get(0).get(0).getArchitecture();
} finally {
prop.setProperty(PARAMETER_1, arch);
}
if (!arch.equals("")) {
vs = new VariableSubstitutor(prop);
message = vs.substituteMultiple(idata.langpack.getString("warning.bdbserver.arch.unsupported.message"), null);
emitWarning(idata.langpack.getString("installer.warning"), message);
}
}
}