1

I would like to achieve the same restart effect as clicking on the Restart button of the glassfish admin web gui (Server->General->Restart) on picture. But I would like to do it via command line

enter image description here

I have some strange behaviour of the app during undeploy. If I restart the server via GUI ant then do the : asadmin deploy asadmin undeploy

the app undeploys in a few seconds

But If I have the GF server as a windows service and do a restart of the service and after that : asadmin deploy asadmin undeploy

the app undeploys in 5 minutes.

So I would like to find the equivalent asadmin command for server restart as via web GUI.

I have already tried:

asadmin restart-domain --force=false domain1
asadmin restart-domain --force=true domain1
asadmin stop-domain domain1
asadmin start-domain domain1

but no luck

simonC
  • 4,101
  • 10
  • 50
  • 78

1 Answers1

0

Here's the script we use:

echo "Stopping the server"
INSTANCES=`asadmin list-instances | grep -v "Command" | cut -d' ' -f1`
for INSTANCE in $INSTANCES; do
    asadmin stop-instance $INSTANCE
done
asadmin stop-domain $DOMAIN

echo "Starting the server"
asadmin start-domain
INSTANCES=`asadmin list-instances | grep -v "Command" | cut -d' ' -f1`
for INSTANCE in $INSTANCES; do
    asadmin start-instance $INSTANCE
done
sirolf2009
  • 819
  • 8
  • 15