Class RestartDomainCommand
- java.lang.Object
-
- com.sun.enterprise.admin.cli.CLICommand
-
- com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
-
- com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
-
- com.sun.enterprise.admin.servermgmt.cli.StopDomainCommand
-
- com.sun.enterprise.admin.servermgmt.cli.RestartDomainCommand
-
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct
- Direct Known Subclasses:
RestartDomainsCommand
@Service(name="restart-domain") @PerLookup public class RestartDomainCommand extends StopDomainCommand
THe restart-domain command. The local portion of this command is only used to block until:- the old server dies
- the new server starts
- Get the uptime for the current server
- start the remote Restart command
- Call uptime in a loop until the uptime number is less than the original uptime
- Author:
- bnevins, Bill Shannon
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
domainDirParam
-
Fields inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
DEFAULT_MASTER_PASSWORD
-
Fields inherited from class com.sun.enterprise.admin.cli.CLICommand
argv, ASADMIN, commandModel, CONNECTION_ERROR, env, ERROR, INVALID_COMMAND_ERROR, lineReader, logger, metadataErrors, name, operands, options, passwords, programOpts, SUCCESS, terminal, WARNING
-
-
Constructor Summary
Constructors Constructor Description RestartDomainCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdasNotRunning()If the server isn't running, try to start it.protected voiddoCommand()Execute the restart-domain command.-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.StopDomainCommand
executeCommand, initDomain, kill, validate, waitForDeath
-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalDomainCommand
getDomainName, getDomainRootDir, getDomainsDir, isThisDAS, prepare, setDomainName
-
Methods inherited from class com.sun.enterprise.admin.servermgmt.cli.LocalServerCommand
checkAdditionalTrustAndKeyStores, checkForSpecialFiles, dataGridEncryptionEnabled, getAdminAddress, getAdminAddress, getDomainXml, getInstallRootPath, getMasterPassword, getMasterPasswordFile, getPrevPid, getServerDirs, getServerPid, getUptime, isLocal, isRemote, isRestartable, isRunning, isRunning, isThisServer, loadAndVerifyKeystore, readFromMasterPasswordFile, resetServerDirs, setLocalPassword, setServerDirs, unsetLocalPassword, verifyMasterPassword, waitForRestart, waitForRestart
-
Methods inherited from class com.sun.enterprise.admin.cli.CLICommand
buildLineReader, buildTerminal, checkHelp, closeTerminal, execute, execute, expandManPage, getBooleanOption, getBriefCommandUsage, getCommand, getCommand, getCommandScope, getCommandUsage, getManPage, getName, getOperandModel, getOption, getOptions, getPassword, getPassword, getProgramOptions, getSystemProperties, getSystemProperty, getUsage, initializeLogger, initializePasswords, inject, newLineReaderBuilder, ok, parse, postConstruct, prevalidate, printExceptionStackTrace, processProgramOptions, quote, readPassword, setCommandScope, toString, usageOptions
-
-
-
-
Method Detail
-
doCommand
protected void doCommand() throws CommandExceptionExecute the restart-domain command.- Overrides:
doCommandin classStopDomainCommand- Throws:
CommandException- if something goes wrong
-
dasNotRunning
protected int dasNotRunning() throws CommandExceptionIf the server isn't running, try to start it.- Overrides:
dasNotRunningin classStopDomainCommand- Returns:
- Success in all cases
- Throws:
CommandException- if the server is remote or cannot be restarted
-
-