Running command-line processing

You can run one or more services by submitting service requests to the server from the command line.

Before running a service, you must assign a server to the service by using the manager. The server must be installed on the server computer and configured to run as a server to process the service request. You must also install the designer to obtain the files that you need to run command-line processing.

There are two options for using the command line:

runservice script

The runservice script is in the base_folder\designer\runservice folder, where base_folder is the base folder for IBM® InfoSphere® Optim™ solution components on your computer. The default base folder for InfoSphere Optim solution components is C:\IBM\InfoSphere\Optim. You must open the command line in the base_folder\designer\runservice folder. The folder contains two script files, one for Microsoft Windows (runservice.bat) and one for Linux and UNIX (runservice.sh).

The runservice script requires that you add the root folder of a Java™ 6.0 JRE or JDK installation to the PATH environment variable.

The runservice script uses the following syntax:

runservice {--service | -s} servicename:version
{--url | -u} connectionmanagerURL {--continueOnError | -c} 
--service | -s servicename:version

The service name and version number (in n.n.n format). Required.

Service names are case-sensitive. If a service name contains a space or contains multibyte character set (MBCS) characters, you must enclose the name in double quotation marks.

For example: -s demosvc:1.0.0.

--url | -u connectionmanagerURL
The location of the connection manager that can be used to locate the service. The location http://localhost:8080 is used by default.

For example: -u http://cmregistry:8080.

--continueOnError | -c

This parameter sets the script to continue sending services to the server for execution, even if a service fails to be started by the server.

java -jar com-ibm-nex-client-tool.jar command

The com-ibm-nex-client-tool.jar file is in the base_folder\designer\runservice folder, where base_folder is the base folder for IBMInfoSphereOptim solution components on your computer. The default base folder for InfoSphere Optim solution components is C:\IBM\InfoSphere\Optim. You must open the command line in the base_folder\designer\runservice folder.

The java -jar com-ibm-nex-client-tool.jar command uses the following syntax, where java_folder is the root folder of a Java 6.0 JRE or JDK installation. To avoid being required to enter the root folder every time that you enter this command, add the root folder to the PATH environment variable.

java_folder/java -jar com-ibm-nex-client-tool.jar 
{--service | -s} servicename:version
{--url | -u} connectionmanagerURL {--continueOnError | -c}
--service | -s servicename:version

The data management service name and version number (in n.n.n format). Required.

Service names are case-sensitive. If a service name contains a space or contains multibyte character set (MBCS) characters, you must enclose the name in double quotation marks.

For example: -s demosvc:1.0.0.

--url | -u connectionmanagerURL
The location of the connection manager that can be used to locate the service. Required.

For example: -u http://cmregistry:8080.

--continueOnError | -c

This parameter sets the script to continue sending services to the server for execution, even if a service fails to be started by the server.

Running multiple services

You can use the command line to run multiple services. The services are started one at a time in the specified order.

Specify each service and version pair separated by a comma. Do not leave a space before or after a comma.

For example:

runservice -s service1:1.0.0,service2:1.0.0 -u http://cmregistry:8080 -c

Spaces in service names

If a service name contains a space or contains multibyte character set (MBCS) characters, the name must be enclosed in double quotation marks (" "). For example:

runservice -s "service name":1.0.0 -u http://cmregistry:8080


Feedback