use of com.sun.enterprise.util.cluster.windows.process.WindowsWmi in project Payara by payara.
the class ValidateDcom method testWMI.
private boolean testWMI() {
int count = -1;
try {
WindowsWmi ww = new WindowsWmi(creds);
count = ww.getCount();
if (debug) {
String[] info = ww.getInfo();
out.append(Strings.get("dcom.wmi.procinfolegend"));
for (String s : info) {
// e.g. '\tCommandLine = "xxxxx"'
String[] lines = s.split("[\t\n\r]");
for (String line : lines) {
if (line.startsWith("CommandLine")) {
out.append(" ").append(line).append('\n');
break;
}
}
}
}
} catch (WindowsException ex) {
setError(ex, Strings.get("dcom.no.wmi", host));
return false;
}
out.append(Strings.get("dcom.wmi.ok", host, count)).append('\n');
return true;
}
Aggregations