Class RestartDomainCommand

All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct

@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
Tactics:
  • 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
  • Constructor Details

    • RestartDomainCommand

      public RestartDomainCommand()
  • Method Details

    • doCommand

      protected void doCommand() throws org.glassfish.api.admin.CommandException
      Execute the restart-domain command.
      Overrides:
      doCommand in class StopDomainCommand
      Throws:
      org.glassfish.api.admin.CommandException
    • dasNotRunning

      protected int dasNotRunning() throws org.glassfish.api.admin.CommandException
      If the server isn't running, try to start it.
      Overrides:
      dasNotRunning in class StopDomainCommand
      Throws:
      org.glassfish.api.admin.CommandException