com.sun.enterprise.v3.admin
Class RestartDomainCommand

java.lang.Object
  extended by com.sun.enterprise.v3.admin.RestartServer
      extended by com.sun.enterprise.v3.admin.RestartDomainCommand
All Implemented Interfaces:
AdminCommand

@Service(name="restart-domain")
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class RestartDomainCommand
extends RestartServer
implements AdminCommand

For non-verbose mode: Stop this server, spawn a new JVM that will wait for this JVM to die. The new JVM then starts the server again. For verbose mode: We want the asadmin console itself to do the respawning -- so just return a 10 from System.exit(). This tells asadmin to restart.

Author:
Byron Nevins

Constructor Summary
RestartDomainCommand()
          version which will use injection
RestartDomainCommand(com.sun.enterprise.module.ModulesRegistry registryIn)
          version which will not use injection
 
Method Summary
 void execute(AdminCommandContext context)
          Restart of the application server : All running services are stopped.
 
Methods inherited from class com.sun.enterprise.v3.admin.RestartServer
doExecute, setDebug, setRegistry, setServerName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestartDomainCommand

public RestartDomainCommand()
version which will use injection


RestartDomainCommand

public RestartDomainCommand(com.sun.enterprise.module.ModulesRegistry registryIn)
version which will not use injection

Method Detail

execute

public void execute(AdminCommandContext context)
Restart of the application server : All running services are stopped. LookupManager is flushed. Client code that started us should notice the return value of 10 and restart us.

Specified by:
execute in interface AdminCommand


Copyright © 2012. All Rights Reserved.