Running an Application Server as a Service

You can run the application server as a service under a Windows operating system that supports services. By default, application servers are not run as services.

When services are installed or removed, entries in the HKEY_LOCAL_MACHINE (HKLM) area of the registry must be modified but standard users do not have the necessary privileges to do this.

The menu options that enable the application server to run as a service are disabled if you do not have the necessary privileges to install or remove an application as a service. Installing, controlling, and removing a service can be performed only if you have sufficient operating system privileges.

JADE does not currently supply a facility to control the order in which services are started or stopped when the host computer is booted. If the application server is started before the database, a message is recorded in the JADE log file.

If you want to install multiple application servers as services on the same host, you must have a separate JADE initialization file for each application server service, because the service installation process must update a unique NodeName, NodeNameDescription, and RunAsService parameter in the [JadeAppServer] section of the initialization file.

To install an application server as a service

  1. From the Application Server window, select the Run as Service command from the Options menu. A check mark is then displayed to the left of the command in the Options menu, indicating that the application server is running as a service. The RunAsService parameter in the [JadeAppServer] section of the JADE initialization file is set to true.

    The newly installed application server service is not yet started and any presentation clients connected to that server node are not affected if the application server is currently running.

  2. When no presentation clients are attached to that application server, exit from the application server (by selecting the Exit command from the Application Server window File menu).

When you have installed the application server as a service and then closed the application server, you can then run the application server as a service.

To start a service after the server has been installed and the application closed

  1. Invoke the application server jadapp executable program. The application server is then started in control service mode, which does not connect to the JADE database.

    The status message in the Application Server window reports whether the service is currently stopped or running, as shown in the following image.

    The Start Service command in the File menu is now enabled.

  2. Select the Start Service command from the File menu.

The application server service that is started is determined by the value of the NodeName parameter in the [JadeAppServer] section of the JADE initialization file specified in the jadapp program command line.

To run more than one concurrent service, you must have a separate JADE initialization file for each application server you want to run as a service, with the appropriate service name specified in the NodeName parameter in the [JadeAppServer] section of each JADE initialization file.

When an application server is running as a service:

To stop a running application server service

The Service Stopped status message is then displayed in the Application Server window and the File menu Start Service and the Options menu Run as Service commands are enabled.

When you select the Stop Service command from the File menu when the application server node is still running as a service, a message box is displayed, advising you that you cannot select this option when the service is running and that you must first stop the service. In addition, the service state (for example, running, stopped, and so on) is continuously updated to reflect service state changes made externally; for example, by using the Task Manager.

To remove an installed service that is not currently running

The check mark is then no longer displayed to the left of the command, the Control Service Mode status message is displayed in the Application Server window, and the application server is no longer connected to the JADE database.

To control an installed service using Windows features