use of com.sun.enterprise.admin.cli.remote.RemoteCLICommand in project Payara by payara.
the class StopDomainsCommand method executeCommand.
@Override
protected int executeCommand() throws CommandException {
try {
String[] domains = userArgDomainName.split(",");
for (String domainName : domains) {
setConfig(domainName);
RemoteCLICommand cmd = new RemoteCLICommand("stop-domain", programOpts, env);
logger.fine("Stopping domain " + domainName);
try {
cmd.executeAndReturnOutput("stop-domain");
} catch (Exception e) {
}
logger.fine("Stopped domain");
}
return 0;
} catch (Exception ex) {
throw new CommandException(ex.getLocalizedMessage());
}
}
Aggregations