use of com.sun.enterprise.util.ProcessExecutor in project Payara by payara.
the class MyDBPlugin method start.
public void start(VirtualMachine virtualMachine, boolean firstStart) {
String[] startdbArgs = { serverContext.getInstallRoot().getAbsolutePath() + File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "start-database", "--dbport", "1528" };
ProcessExecutor startDatabase = new ProcessExecutor(startdbArgs);
try {
startDatabase.execute();
} catch (ExecException e) {
e.printStackTrace();
}
}
use of com.sun.enterprise.util.ProcessExecutor in project Payara by payara.
the class MyDBPlugin method stop.
public void stop(VirtualMachine virtualMachine) {
String[] stopdbArgs = { serverContext.getInstallRoot().getAbsolutePath() + File.separator + "bin" + File.separator + "asadmin" + (OS.isWindows() ? ".bat" : ""), "stop-database", "--dbport", "1528" };
ProcessExecutor stopDatabase = new ProcessExecutor(stopdbArgs);
try {
stopDatabase.execute();
} catch (ExecException e) {
e.printStackTrace();
}
}
use of com.sun.enterprise.util.ProcessExecutor in project Payara by payara.
the class SMFService method validateService.
private void validateService() throws Exception {
final String[] cmda = new String[] { SMFService.SVCCFG, "validate", getManifestFilePath() };
final ProcessExecutor pe = new ProcessExecutor(cmda);
pe.execute();
if (info.trace)
printOut("Validated the SMF Service: " + info.fqsn + " using: " + SMFService.SVCCFG);
}
Aggregations