Running InterChange Server components and adapters as Windows services enables the remote management, administration, and configuration of InterChange Server components using standard Microsoft Windows utilities. As Windows services, the components can also be configured to start automatically upon restart of the Windows system.
IBM provides a services setup program called CWServices that configures InterChange Server (ICS) and other ICS system components to run as Windows services. This services-setup program, cwservices.exe, resides in the following directory: ProductDir\bin
For a successful installation of InterChange Server, the Persistent Naming Server, or adapters as Windows services, follow the instructions in each of the following sections in order:
Before you can configure InterChange Server to run as a Windows service, the system must meet the following requirements:
If you are running InterChange Server components as Windows services that you set up in a prior versions of InterChange Server software, you must uninstall them as Windows services before proceeding. Use the CWServices setup program to uninstall the InterChange Server service. For example:
cwservice -xr -sInterchangeServerName
The CWService utility installs InterChange Server system components as Windows services. CWService has the following basic syntax:
cwservice -xi -mode=modeType -tserviceType -cserviceStartupScript
Table 7. Valid ICS components for the CWService utility
ICS component | Service type | Service startup script | Directory |
---|---|---|---|
InterChange Server | SERVER | start_server_service. bat | ProductDir\bin |
Adapter | Adapter | start_connName_service.bat (where connName is the name of the adapter) | ProductDir\ connectors\connName |
Persistent Naming Server | NAMESERVER | PersistentNameServer.bat | ProductDir\bin |
To use the CWService utility, run one of the cwservice commands shown in
Table 10.
Table 8. Service-startup commands for ICS components
ICS component | command syntax |
---|---|
InterChange Server | cwservice -xi -mode=modeType -tSERVER
-cICSserviceStartupScriptPath -sInterChangeServerName
-pportnumber
Notes:
|
Adapter | cwservice -xi -mode=modeType -tCONNECTOR
-cadapterServiceStartupScriptPath -sadapterName
-iInterChangeServerName -tthreadModel
-pportnumber
Valid values for the threadModel option are MULTI_THREADED or SINGLE_THREADED |
Persistent Naming Service | cwservice -xi -mode=modeType -tNAMESERVER -cNameServiceStartupScriptPath -sserviceName -pportnumber |
When the CWService utility installs an ICS component as a Windows service on a server, it creates a service name of the form CWinterchange ICScomponentName.
During the installation (or configuration) process of ICS components, Installer (or the configuration tool) creates special startup scripts to run an ICS component as a Windows service. Many of the startup scripts that start an ICS component from a command line cannot be used to start the component as a Windows service. These service-startup scripts enable the ICS component to start up as a Windows service.
For example, the Installer customizes the start_server_service.bat file from information you provide as part of the Services screen in the installation process. Other configuration tools present a default template for generating the appropriate service startup script for the ICS component. You can accept this template or replace it with one you choose.
After installing InterChange Server Windows services, reboot your machine, then check to see if you can start the components using Windows services.
CWinterchange ICSinstanceName
where instanceName is the ICS instance name you specified with the -s command-line argument when you set up the service. Verify that the Status for this component is Stopped, and the Startup is Manual.
When the status of the Service Control message changes to Started, Windows services has successfully started InterChange Server.
If problems occur during the installation procedure or if InterChange Server or adapters fail during startup as a service, check the Windows Event Log, using the Event Viewer.
You can troubleshoot using the service batch files, if the problem is with adapter or server configuration. However, use caution when directly modifying these files. To make sure the problem is not with a particular batch file, run the batch file from the command prompt window.
If you receive the error (2140), An internal windows error occurred, a Java run time current version key mismatch is a possible cause. This mismatch can occur when you install another application on the same machine as InterChange Server; the second application can change the Java run time version to something other than the one required for InterChange Server software. To ensure that you are running the correct version as your current version, reinstall the Java compiler, using the instructions on "Installing the Java compiler"..