I found a solution (it's more a workaround).
When I start glassfish as an application then I start a gfdaemon.bat file too. Which trys in a loop to start the glassfish server and then waits 60sec.
gfdaemon.bat:
:loop
rem echo start domain....
call D:\dev\3rdparty\glassfish-v2ur2\glassfish\bin\asadmin.bat start-domain
rem wait 60sec
echo wait 60sec...
ping 127.0.0.1 -n 60 -w 1000
goto loop
Now I use my Administration Client to call my restart jax-rpc webservice method(in that glassfish that should be restarted) which calls the Restarter.class and the Restarter calls the stopgf.bat.
stopgf.bat:
echo stop domain....
call D:\dev\3rdparty\glassfish-v2ur2\glassfish\bin\asadmin.bat stop-domain
exit
It works fine expect that the daemon.bat needs 25% of my cpu. :(
But at least I can restart the server from my Administration Client.
[Message sent by forum member 'montsie' (montsie)]
http://forums.java.net/jive/thread.jspa?messageID=300340