In this section: |
The iwsrv executable program allows you to install a Windows service for iWay Service Manager (iSM) that can be used to start an iSM configuration. You can also start iSM using iwsrv in a command window for debugging purposes.
This section lists and describes all of the available options for the iwsrv executable program.
The full syntax for the iwsrv command is:
iwsrv [config_name] [-s service] [-l launch] [options]
where:
Is the name of the iSM configuration that is loaded for this instance. The default iSM configuration is base.
Is the name of the iSM Windows service that is executed. Valid values are:
start: Starts the iSM configuration for the Windows service (default). For more information, see How to Start iSM in a Command Window.
stop: Stops the iSM configuration for the Windows service. For more information, see How to Stop iSM in a Command Window
install: Installs the iSM Windows service. For more information, see How to Install an iSM Windows Service.
remove: Deletes the iSM Windows service. For more information, see How to Delete an iSM Windows Service.
query: Displays the options that were used to install an iSM Windows service. For more information, see How to Query the Install Options for an iSM Windows Service.
Specifies the launch method. Valid values are:
java: Loads Java in a separate process and uses the JVM options, NT dependencies, and other preferences found within the iSM configuration that are configured through the console.
For example:
iwsrv config_name -s start -l java
where:
Is the name of the iSM configuration.
Using the -l option forces the iSM Windows service to load Java in a separate process. When the iSM Windows service is stopped, iwsrv.exe and java.exe are terminated.
Specifies tracing or server backup information. Valid values include:
-b: Indicates that iSM is a backup server.
For example:
iwsrv config_name -s start -b
where:
Is the name of the iSM configuration.
-c: Enables tracing. In this mode, you can display useful error messages on the console. For example, you can display a message which indicates that the Java Runtime Environment (JRE) is not properly installed.
For example:
iwsrv config_name -s start -c
where:
Is the name of the iSM configuration.
-d: Limits tracing to debug only.
For example:
iwsrv config_name -s start -d
where:
Is the name of the iSM configuration.
-f: [PATH] -- Filters the system path when invoking Java.
-f [RESTART] -- Suppresses the JVM fault restart capability.
-h: Sets the iWay61 home directory.
For example:
iwsrv config_name -s start -h C:\Program Files\iWay61
where:
Is the name of the iSM configuration.
-t: The amount of time (in seconds) to process an iSM Windows service shutdown.
For example:
iwsrv config_name -s start -t
where:
Is the name of the iSM configuration.
Note:
For debugging purposes, you can run iSM in a command window instead of running it as a Windows service.
The command window enables you to interact with iSM and displays diagnostic information about iSM processing.
To start iSM in a command window:
C:\Program Files\iWay61\bin
iwsrv
By default, the iSM base configuration is started.
Note: To start other iSM configurations, type the iSM configuration name after the iwsrv command. For example:
iwsrv TestConfig
iSM configuration names are case-sensitive.
Messages are displayed in the command window detailing the iSM startup process. The following prompt is displayed when the iSM startup process is completed:
Enter command:>
If you receive the following error message, then iSM is probably already running as a Windows service:
ERROR (HTTP1) Unable to create server socket 9980: java.net.BindException: Address already in use: JVM_Bind ERROR (SOAP1) Unable to create server socket 9000: java.net.BindException: Address already in use: JVM_Bind
You cannot run the same iSM configuration at the same time as an iSM Windows service and in the command window.
To stop iSM in a command window:
Enter command:>
stop
quit
Note: If you close the command window without typing these commands, iSM stops. However, typing the commands is the recommended procedure.
This section describes how to install and delete an iSM Windows service that can be used to start an iSM configuration.
By default, the iwsrv executable program installs an iSM Windows service to run out of process. You can view the options that were used to install an iSM Windows service by using the iwsrv query option. For more information, see How to Query the Install Options for an iSM Windows Service.
To install an iSM Windows service:
C:\Program Files\iWay61\bin
iwsrv config_name -s install
where:
Is the name of the iSM configuration for which you are creating a Windows service.
To create a Windows service with Java running in a separate process, type
iwsrv config_name -s install -l java
where:
Is the name of the iSM configuration for which you are creating a Windows service.
A message is displayed, indicating that the iSM Windows service was installed successfully.
You must now start the iSM configuration as a Windows service. For more information, see How to Start an iSM Configuration as a Windows Service.
To delete an iSM Windows service that you created to start an iSM configuration:
C:\Program Files\iWay61\bin
iwsrv config_name -s remove
where:
Is the name of the iSM configuration for which you are deleting a Windows service.
A message is displayed, indicating that the iSM Windows service was deleted successfully.
You can now delete the iSM configuration from the iWay Service Manager Administration Console. For more information, see How to Remove a Configuration From the Console.
To start an iSM configuration as a Windows service:
The Control Panel opens.
The Administrative Tools are displayed.
The Windows Services are displayed.
The service Status changes to Started. The default Startup Type is Automatic.
For debugging purposes, you can perform a query to display the options that were used to install an iSM Windows service.
To query the install options:
C:\Program Files\iWay61\bin
iwsrv config_name -s query
where:
Is the name of the iSM configuration for which you are running a query.
Information showing the options that were used to install the iSM Windows service is displayed in the command window. For example:
Copyright (C) iWay Software. 2001-2012 All Rights Reserved "iWay Service Manager 6.1 - base" is currently installed Installation date : 11/23/2012 Installed via : iwsrv.exe base -s install -l java -h C:\iway61x23 Installed by : Administrator
This section describes how the iwsrv executable program selects a JVM in process (not -l Java).
\jre\bin\server\jvm.dll
JavaSoft\\Java Runtime Environment\1.4\RuntimeLib
The 1.4 component of the key is dynamic based on the current version of the JRE. The value of this key is then used to load the JVM. For example:
E:\Program Files\Java\j2re1.4.1_03\bin\client\jvm.dll
This section describes the available server command files that you can use to manually control channel activity on startup.
You can use iWay Service Manager (iSM) to execute commands, such as start and stop, from the iSM command shell.
Note: The iway61.cmd file is not supported in production environments. It is only recommended for testing and debugging purposes.
These commands can also be added to command files and executed by the following:
All server commands that are available from the shell can be included in command files. iWay expects that those commands that affect the server, such as start, stop and set will be the most useful. Nothing prevents other commands, such as memory, from being run in the command file. However, the information that is output by these commands may not appear in a convenient place.
Note: To control which JRE is used by the iWay Secure Messaging Option (iSMO) product, you can set the machine's environment variable IWAYISM61 to the full path where the jvm.dll file is located. For example:
IWAYISM61=c:\java\jre\bin\server\jvm.dll
Command files can make use of the iWay Functional Language during their execution. For example, consider a properties file that contains the following lines:
1. dostart=start 2. whattoday=chan3
Now consider the following command file:
1. // this is a test file 2. set debug on 3. _properties('c:/testprop','dostart',';') file1 4. _if(sreg('true')='true'),'start file1',';') 5. // last line of test file
The first line is a comment. Any line beginning with a // or a semicolon is a comment. The second line enables debug tracing. The next line is an IFL statement, testing the dostart property in the testprop properties file. If the property is not found, the semicolon is returned and the line is ignored. If it is found, the value start is returned, and the line now reads:
start
The first line is a comment. Any line beginning with a // or a semicolon is a comment. The second line sets the debug trace to on. Line 3 is an IFL statement, testing the dostart property in the testprop properties file. If the property is not found, the semicolon is returned and the line is ignored. If it is found the value start is returned, and the line now reads:
start file1
This line starts the named channel.
Line 4 is another IFL statement. In this case, if the special register condition1 is set to true, then the start file1 command is executed.
So there are two methods for conditionally executing lines in the command file.
The command file also supports the special command goto <label>. A label is a named point in the file ahead of the goto command. A label ends with a colon and must exist on a line with no other commands.
1. // this is a test file with goto 2. goto point 3. _if (_properties('c:/props','whattoday')=='chan3','goto point3') 4. start chan1 5. start chan2 6. goto end 7. point3: 8. start chan3 9. end: 10. // last line of test file
In this command file, the IFL statement on line 3 instructs the server that if the whattoday property is set to chan3, then the commands pick up on line 7. Else, the commands on lines 4 through 6 will execute.
The autocmd.txt file can be configured to run during the iSM startup process to set customized options for use by iSM. For example, this configuration file can be used to map network drives on your system.
To enable this functionality, the autocmd.txt file must be copied to an iSM configuration directory. For example:
C:\Program Files\iWay61\config\base
The contents of the autocmd.txt file can point to a batch file on your file system. For example:
shell C:\a1.bat
The batch file (for example, a1.bat) can contain the following network drive assignments:
net use W: /delete > c:\iway61\netuse.txt 2>&1 net use W: \\ibiprda\IBI xxxx /USER:ibi\XX12345 /persistent:yes >> c:\iway61\netuse.txt 2>&1
iWay Software |