In GlassFish v3, this can be done with a single asadmin command:
restart-domain
.First, I tried
restart-domain
while the server is not running, which is equivalent to start-domain
command:./asadmin restart-domainThen, try it while the server is running. This command takes a few seconds to finish since it involves stopping the domain first, possibly pausing a bit, and then starting the domain:
Server is not running, will attempt to start it...
Waiting for DAS to start .....................
Started domain: domain1
Domain location: /v3/glassfish/domains/domain1
Log file: /v3/glassfish/domains/domain1/logs/server.log
Admin port for the domain: 4848
Command restart-domain executed successfully.
./asadmin restart-domain
Successfully restarted the domain
Command restart-domain executed successfully.