Technical data

Setting Up a WebLogic Server Instance as a Windows Service
Administration Guide 2-27
You can also add the -delay:delay_milliseconds option to a Managed
Server Windows service if you want to configure when the Windows SCM
reports a status of
STARTED for the service.
Enabling Graceful Shutdowns from the Windows Control Panel
By default, if you use the Windows Control Panel to stop a server instance, the
Windows Service Control Manager (SCM) kills the server’s Java Virtual Machine
(JVM). If you kill the JVM, the server immediately stops all processing. Any session
data is lost. If you kill the JVM for an Administration Server while the server is writing
to the
config.xml file, you can corrupt the config.xml file.
To enable graceful shutdowns from the Windows Control Panel:
1. In a text editor, open the
weblogic\config\mydomain\installNTService.cmd script.
2. Add the following argument to the command that invokes the beasvc utility:
–stopclass:weblogic.Server
With this argument, when you stop a server Windows service from the Windows
Control Panel, the Windows SCM invokes the
stop() method of the servers
ServerRuntime MBean. This management method gracefully shuts down a
server.
For example, the modified
beasvc invocation for the server instance will
resemble the following:
"D:\bea\wlserver6.1\bin\beasvc" -install
-svcname:mydomain_myserver
-javahome:"D:\bea\jdk131"
-stopclass:weblogic.Server
-execdir:"D:\bea\wlserver6.1"
-extrapath:"D:\bea\wlserver6.1\bin" -cmdline:%CMDLINE%
For more information about beasvc, enter the following command at a
command prompt:
weblogic\server\bin\beasvc -help, where weblogic is
the directory in which you installed WebLogic Server.
3. Consider modifying the default timeout value that the Windows SCM specifies.
By default, when you use the Windows 2000 Control Panel to stop a Windows
service, the Windows SCM waits 30 seconds for the service to stop before it
kills the service and prints a timeout message to the System event log.