Configuring adapters as Windows Services

You can configure adapters to run as Windows services so that they can be remotely managed, can start automatically when the computer starts, and can be restarted automatically if they experience a fatal error.

Do the following to configure an adapter as a Windows service:

  1. Create a copy of the batch file used to start the connector and open the copy in a text editor such as Notepad, then do the following:
    1. Use a "find and replace" function to replace the string %CONNAME%Connector with the actual name of the connector, for example JDBCConnector.
    2. Use a "find and replace" function to replace the string %SERVER% with the actual name of the InterChange Server instance with which the connector will communicate, if InterChange Server is the broker.

      If you are using a broker other than InterChange Server, specify a placeholder value such as WMQI or WAS.

    3. Save and close the file.
    Note:
    It is particularly important to use a copy of the batch file that starts a connector when configuring it as a service because some connectors share a common batch file. If you make such edits to a batch file shared by multiple connectors then they will no longer work.
  2. Execute the following command at the command line to configure an adapter as a Windows service:
    ProductDir\bin\cwservice -xi -mode=ServiceStartupType -tCONNECTOR 
     -cConnectorBatchFile -sConnectorName -iInterChangeServerName -tThreadMode
     
    

    where the following are true:

The command creates a Windows service named CWInterchange ConnectorName where ConnectorName is the value you specified for the ConnectorName parameter when executing the command.

Copyright IBM Corp. 1997, 2003