users@glassfish.java.net

Re: Node Agent Windows Service

From: <glassfish_at_javadesktop.org>
Date: Mon, 17 Mar 2008 16:55:30 PST

Please try this document.
http://docs.sun.com/app/docs/doc/819-3671/ablwz?a=view

For example, to create a service called SunJavaSystemAppServer DOMAIN1 that starts and stops the domain domain1, using a password file C:\Sun\AppServer\password.txt:

C:\windows\system32\sc.exe create domain1 binPath=
"C:\Sun\AppServer\lib\appservService.exe \"C:\Sun\AppServer\bin\asadmin.bat
start-domain --user admin --passwordfile C:\Sun\AppServer\password.txt domain1\"
\"C:\Sun\AppServer\bin\asadmin.bat stop-domain domain1\"" start= auto
DisplayName= "SunJavaSystemAppServer DOMAIN1"

To create a service that starts and stops the node agent agent1:

C:\windows\system32\sc.exe create agent1 binPath=
"C:\Sun\AppServer\lib\appservAgentService.exe \"C:\Sun\AppServer\bin\asadmin.bat
start-node-agent --user admin --passwordfile C:\Sun\AppServer\password.txt agent1\"
\"C:\Sun\AppServer\bin\asadmin.bat stop-node-agent agent1\"" start= auto
DisplayName= "SunJavaSystemAppServer AGENT1"

Thanks,
hyau
[Message sent by forum member 'hyau' (hyau)]

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