These instructions describe how to use the ServiceInstaller utility to install and uninstall additional ArcIMS Monitor processes as Windows services. The utility is based on the free JavaService utility available from Alexandria Software Consulting (http://www.alexandriasc.com/software/JavaService/index.html). The following license information comes from the Alexandria Software Consulting website:
By downloading and/or using this software you agree to abide by the following license:
Copyright (c) 2000, Alexandria Software Consulting. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.
Neither name of Alexandria Software Consulting nor the names of the contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
These instructions assume that ArcIMS is already installed and working in a single application server setup. To install ArcIMS see the topic Performing a typical installation.
The second Monitor service added to a machine cannot point to the same ArcIMS Application Server as the first Monitor service on that machine.
Create a new folder "Monitor2" under <ArcIMS Installation Directory>\ArcIMS\Server
Copy the following properties files from the <ArcIMS Installation Directory>\ArcIMS\Server\Monitor folder to the \Monitor2 folder:
Monitor.properties
Sde.properties (available based on installed components only)
Monitor_Res.properties
Monitor_Res_en_US.properties
Open the \Monitor2\Monitor.properties file. Change the following properties as described as follows:
registryHost – set this to the name of the computer where the second (remote) ArcIMS Application Server is running.
listenerPort – specify a port other than 5050 (the default) for communications between the second Monitor and the other ArcIMS components. For example, you can typically set this to 5051 (assuming 5051 is not already in use).
NOTE: The second Monitor service added to a machine cannot point to the same ArcIMS Application Server as the first Monitor service on that machine.
Close and save the \Monitor2\Monitor.properties file.
Copy the files from the <ArcIMS Installation Directory>/ArcIMS/Middleware/Utility folder into the \Monitor2 folder.
Aims_Monitor.exe
installMonitor.bat
uninstallMonitor.bat
Rename Aims_Monitor#.exe appropriately, for example, Aims_Monitor2.exe.
Open installMonitor.bat in Notepad. Edit the following parameters as needed:
SET serviceExe=<ArcIMS Installation Directory>\ArcIMS\Server\Monitor2\Aims_Monitor2.exe
The location where Aims_Monitor2.exe was copied to in Step 5.
SET monitorName="ArcIMS Monitor II 9.0"
The name you want to use for this service. This is the name that will appear in Windows’ services control manager.
SET javaDll="C:\Jre\j2re1.4.0\bin\client\jvm.dll"
Location of the jvm.dll (Java Virtual Machine) to be used. Typical locations include: {JRE_HOME}\bin\client\jvm.dll
There are two requirements for the version you use:
- It must be JRE 1.3.x or higher.
- It must be supported for use with the version of ArcIMS you’re using.
For more information on Java versions supported with ArcIMS, see the ArcIMS System Requirements pages on the ESRI Online Support Center, http://support.esri.com.
SET classpath= .;<ArcIMS Installation Directory>\ArcIMS\Server\Monitor;<ArcIMS Installation Directory>\ArcIMS\Middleware\Lib\aimsmutil.jar;<ArcIMS Installation Directory>\Server\Middleware\Lib\jsde83_sdk.jar; <ArcIMS Installation Directory>\ArcIMS\Middleware\Lib\jsde83_sdkres.jar
The classpath must be all on one line, with no spaces appearing anywhere after the equals (=) sign. The classpath must include the locations of the following folders and files:
- The \Server\Monitor folder
- The aimsmutil.jar file
- The jsde83_sdk.jar file
- The jsde83_sdkres.jar file
SET propFile=<ArcIMS Installation Directory>\ArcIMS\Server\Monitor2\Monitor.properties
The location of the Monitor2\Monitor.properties file.
SET serverExeDir=<ArcIMS Installation Directory>\ArcIMS\Server\bin
The location of aimsserver.exe.
SET stdoutFile=<ArcIMS Installation Directory>\ArcIMS\Server\Monitor2\stdout.txt
SET stderrFile=<ArcIMS Installation Directory>\ArcIMS\Server\Monitor2\stderr.txt
The location of the standard output and error files.
Set currentPath=<ArcIMS Installation Directory>\ArcIMS\Server\Monitor2
Save and close the installMonitor.bat file.
Open uninstallMonitor.bat in Notepad. Edit the following properties as needed to match what you set in your \Monitor2\installMonitor.bat file:
SET serviceName="ArcIMS Monitor II 9.0”
SET serviceExe=<ArcIMS Installation Directory>\Server\Monitor2\Aims_Monitor2.exe
Save and close the file.
Run installMonitor to install the second Monitor service.
By default, the new service will be installed with Local System as the logon account. If necessary, change the service logon to match that of the default monitor service. This may be needed to allow the service to write images to the output directory over the network. To do this:
a. Open Windows Services manager (under Control Panel or Administrative Tools).
b. Right-click the default (original) Monitor service and choose Properties.
c. Find and note the Log On account.
d. Click Cancel to close the Properties dialog window.
e. Right-click the new Monitor service and choose Properties.
f. Enter the same Log On account as noted in Step C above.
g. Click OK.
1. Go to Control Panel > Services and stop the second monitor service.
2. Run unistallMonitor.bat located in the \Monitor2 folder.
3. Delete the Monitor2 directory located at <ArcIMS Installation Directory>\ArcIMS\Server.