An abstract method that Executes the command
CLILogger.getInstance().printWarning(getLocalizedString("CommandDeprecated",
new Object[] {name}));
validateOptions();
String[] domainsList = null;
try
{
DomainConfig domainConfig = new DomainConfig(null, getDomainsRoot());
DomainsManager manager = getFeatureFactory().getDomainsManager();
domainsList = manager.listDomains(domainConfig);
}
catch(Exception e)
{
throw new CommandException(getLocalizedString("CommandUnSuccessful",
new Object[] {name} ), e);
}
boolean allDomainsStarted = true;
if (domainsList.length == 0)
throw new CommandException(getLocalizedString("NoDomainsToStart"));
else
CLILogger.getInstance().printDetailMessage(getLocalizedString("StartingAppserv",
new Object[] {getDomainsRoot()}));
for (int i = 0; i < domainsList.length; i++)
{
try
{
startDomain(domainsList[i]);
}
catch(Exception e)
{
allDomainsStarted = false;
CLILogger.getInstance().printDetailMessage(e.getLocalizedMessage());
CLILogger.getInstance().printExceptionStackTrace(e);
CLILogger.getInstance().printError(getLocalizedString("CannotStartDomainMsg",
new Object[] {domainsList[i]}));
}
}
if (!allDomainsStarted)
{
throw new CommandException(getLocalizedString("CannotStartOneOrMoreDomains"));
}