Install production servers as Windows services, so the servers start automatically when Windows starts. Do not install development servers as Windows services, since you will often want to run the debug server on your development machine, and you cannot run the debug server as a Windows service.
Installing a server as a Windows service
Configure any environment variables required for the server process. The DJC_HOME, PATH, CLASSPATH environment variables are saved in a configuration file when you install the server as a service.
Run the following command in the EAServer bin subdirectory, substituting the server name for server and the service name for service:
service [-server server] -install [-servicename service]
The environment variables and other service options are saved in %DJC_HOME%\config\winservice_serviceName.ini, where serviceName is the name of the service.
If you run service -install
with
no options, the local server is installed as a service called EAServer,
and the name of the configuration file is winservice_EAServer.ini.
Configure the service to run using the account of the user who installed the service.
On Windows 2000 and Windows XP:
Select Start | Settings | Control Panel | Administrative Tools | Services.
Highlight the name of the service, right-click, and select Properties.
In the Properties dialog, select the Log On tab, then select Log On As This Account, and enter:
The account name of the user who installed the service. You can also click Browse, and select the account name.
The password for the user account.
Click Apply.
If you delete a server definition after installing the
server as a Windows service, remove the server from the list of
Windows services.
Manually starting servers that are installed as Windows services
If a server is installed as a Windows service, the server starts automatically when you start Windows. To start a service manually, use the Services dialog in the Windows Control Panel.
On Windows 2000 and Windows XP:
Select Start | Settings | Control Panel | Administrative Tools | Services.
In the list of Services, find the name of your server. The name of the preconfigured server is the name of the machine on which EAServer is installed.
To stop the server, double-click the server name, and in the server Properties dialog box, click Stop.
To start the server, double-click the server name, and in the server Properties dialog box, click Start.
You can also run this command in the EAServer bin subdirectory:
service -servicename serviceName -start
where serviceName is the name of the server. To stop the server, run:
service -servicename serviceName -stop
Table 3-10 describes the options for managing Windows services.
Option |
Description |
---|---|
-config |
Reconfigures an installed service. If you use the -config option to change system settings, such as CLASSPATH, the service settings that are stored in the Registry are reconfigured. |
-debug |
Allows you to test a service by running it on the command line. The service need not be installed. To simulate and test stopping, pausing, and continuing, start the service using the -debug option, then:
|
-install |
Installs the server as a Windows service. |
-remove |
Removes the server from the list of Windows services. |
-restart |
Stops, then restarts the service. |
-server server |
The name of the server. |
-servicename service |
Specifies a service name. If not specified, the default is the server name. |
-start |
Starts a server that has been installed as a Windows service. When installed as a service, the server starts automatically when Windows starts. Use this option only after you have stopped or shut down the server. |
-stop |
Shuts down a server that has been installed as a Windows service. You can also stop the server using the Services dialog in the Control Panel, or from the Management Console. |
Removing a server from the list of Windows services
Run:
service -servicename service -remove
where service is the name of the server as displayed in the Services dialog box.