EnterpriseElements Logo

Running Elements As a Windows Service

Installing

Normally the Elements service is added as part of the installation. The installer allows you to specify a name for the service, and choose whether or not you want it intsalled. If you chose not to install it intially, it is still possible to install it later.

Troubleshooting service problems.

Occasionally a service may install without apparent problems, but refuse to start. The following steps should help you resolve the problem. The ELEMENTS_HOME directory is the directory where you installed Elements.

  1. Verify that there are no other services on the machine operating on the same port as the server you are trying to start. The default is 8082 for Elements. You can change this assignment with the configuration utility.
  2. Check the ELEMENTS_HOME/logs directory. Look for a log file that starts with "jakarta_service_". Open this file and look for any indications of the service failing to start. If you have trouble understanding any of the messages contact your Elements support representative.
  3. If the file described above is not present, remove and reinstall the service.

Removing and reinstalling the service.

  1. Open a console and change to the directory where you installed Elements. Then change to the bin directory.
  2. Assuming that the service was originally installed as EnterpriseElements, enter the following at the command prompt.
    service.bat remove EnterpriseElements
    This removes the existing service installation.
  3. Reinstall the service, enter the following at the command prompt.
    service.bat install EnterpriseElements

At this point you should be able to start your service from the Windows service control panel applet. If you continue to have trouble using the application, look at the service log described above, and the stdout.log file. Your Elements support representative can help you with the contents of these files.

If you choose something other than "EnterpriseElements" as a service name, be aware that colons, and spaces are not allowed in service names.

If you have removed and reinstalled your service, it will be set to start manually. If you want the service to start automatically you can use the Windows service control panel applet.

If you changed your service to start automatically, you should also create a dependency for your database service.

Adding service dependencies.

There are two services which must be available for your Elements server to start. The Oracle database service, and the Oracle TNSListener service. To get the exact names for these services you should check the Windows service control panel applet. Examples of common names are: OracleServiceORCL, the database service, and OracleOraHome92TNSListener, for the listener. The exact names may be different on your machine, but should follow this pattern.

When you have the names you are ready to begin.

  1. Go to Start Button select Run, then type in the following:
    regedt32
    Then click OK.
  2. In the Registry Editor, navigate to:
    HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->EnterpriseElements (or whatever you named your Elements service).
  3. If you see "DependOnService" entry in the right panel, double click it. If it is not present follow these steps.
    • For Windows XP (and later):
      1. Right click in the right hand panel and from the context menu select new.
      2. From the submenu select "Multi-String Value".
      3. Enter the name "DependOnService" (without the quotation marks).
      4. Press enter, with the new value still selected.
      5. When the Edit Multi-String dialog box appears, type the name of the services that you are adding with one entry for each line, and then click OK. Enter the name of the TNSListener service first.
      6. Exit the registry editor.
    • For Windows 2000: (use regedt32)
      1. Click in the right hand panel.
      2. From the edit menu select Add Value.
      3. Set the value to "DependOnService" (without the quotation marks), select REG_MULTI_SZ, as the type.
      4. When the Edit Multi-String dialog box appears, type the name of the services that you are adding with one entry for each line, and then click OK. Enter the name of the TNSListener service first.
      5. Click OK to close the dialog, verify the new value and exit the registry editor.

    To verify that the dependencies are present check the Windows service control panel applet.

    • With the applet open, right click on the name of your service, select properties from the context menu.
    • From the properties dialog, select the Dependencies tab.
    • You should see the services you just entered in the list in the middle of the panel.
    • Click OK.

    Adding Service Name to Registry

    After installing the service you will need to add an entry to the registry if you want to launch the "Service Control Panel" from the configuration utility.

    • Open regedit, and navigate to:
       HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs\com\ee\homes 
    • Select the current installation home, and add a new key. The key name is /S/E/R/V/I/C/E_/N/A/M/E (with slashes), the value of the key is the name of the new service.
    If you don't want to add the registry key, you can launch the panel manually:
    • Open a command line and navigate to the elements bin directory.
    • Execute "tomcat5w //ES//NAME_OF_SERVICE", this will launch the Service Control Panel.
    • Verify the location of the path to the executable.

    If you have problems launching the "Service Control Panel" from the configuration utility look closely at the name presented on the error dialog. If it appears to be missing a character, check the registry key noted above. If the value of the service name begins with a slash, remove the slash.

    Adjust server memory settings.

    When the service is installed it uses the default settings for memory allocation. If you have problems with your server running out of memory, or you anticipate a large number of users, you should adjust the service memory settings.

    1. Open the configuration utility, and click on the Service Contorl Panel utility.
    2. When the dialog opens, select the Java tab.
    3. Near the bottom are three settings.
      • Initial Memory Pool -- The amount the server starts with, start with a value of 128M
      • Maximum memory pool -- The maximimum amount the service may use. Set this value as high as you can, given other demands on your machine (such as your database) if possible set to 1024M, or if that takes too much, set to 512M.
      • Do not change the Thread stack size.
      • Click OK, and close the dialog.

    Additional service resources.

    The following contain advanced information and specifics on which the web server service is based.

    • There is additional information on Resetting Service and Config in this documentation.
    • The Apache Tomcat Service How To. A detailed guide to the advanced options used with the service.
    • Documentation for procrun a part of the Jakarta Commons project from which the Tomcat service is derived.
    • You can get additional information on the status of a Window's service through the command line with the sc.exe utlitiy. For example:
      sc query ServiceName