users@glassfish.java.net

Re: restart glassfishv2u2 programmatically

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Sep 2008 05:10:05 PDT

Can you please explain how running of batch is dependent on running of domain ?
A batch file will run even if the domain stops.
To restart an instance you need to first stop it and then start it again.
I am assuming that you run your restart batch file when domain is alive, i.e it is listening to 8080
Hence, when you run restart.bat it fails to start because port 8080 is already listening.

You may want to modify your restart script as I am still not convinced with the
starting an already up domain.

The restart script should be something like this:

stop-domain
wait - for 5 mins
start-domain

Please do one thing : If your domain is stopped then start it manually.

Then try manually what you have mentioned in your script - stepwise
.
start D:\dev\server\bin\startgf.bat
call D:\dev\3rdparty\glassfish-v2ur2\glassfish\bin\asadmin.bat stop-domain
  
You'll see the difference
[Message sent by forum member 'anzy' (anzy)]

http://forums.java.net/jive/thread.jspa?messageID=300078