Skip to end of metadata
Go to start of metadata
You are viewing an old version of this content. View the current version.
Compare with Current
View Version History
« Previous
Version 4
Next »
Assuming the steps outlined in the previous sections have been completed Tomcat and ServiceManager are now available for operation. ServiceManager is a web application hosted by its application server. To run ServiceManager it is the hosting application server, Tomcat, which must be executed.
On Windows Tomcat can be executed either from the command line, or as a service.
Tomcat Service Installation | Tomcat should be installed as a service through the supplied install_tomcat_service.bat file located within the SVM_HOME directory. This file is responsible for setting up the appropriate environment variables required by ServiceManager and Tomcat (via the svmconf.bat file) prior to calling the Tomcat provided service.bat .
> c:
> cd "\Program Files\ServicePower\SERVICEManager"
> install_tomcat_service install
install_tomcat_service.bat takes up to two parameters: install_tomcat_service <install|remove> [service_name] Where: install | Sets Tomcat up as a service, and updates the Windows registry. | remove | Removes the service and deletes the Windows registry entries | service_name | Is optional and allows the system to be set up with a specific service name. |
C:\web\SERVICEManager>install_tomcat_service.bat install svmdemo
** install_tomcat_service.bat - Tomcat/SERVICEManager service installation routine **
** svmconf.bat - SERVICEManager environment configuration **
Defining JRE_HOME...
JRE_HOME defined as: C:\web\SERVICEManager\java\jre
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode)
Installing the service 'svmdemo' ...
Using CATALINA_HOME: C:\web\SERVICEManager\tomcat
Using JAVA_HOME:
Using JVM: \jre\bin\client\jvm.dll
Update service 'svmdemo' with SERVICEManager details.
The service 'svmdemo' has been installed.
Service Installation RestrictionsAs mentioned, install_tomcat_service.bat delegates to Tomcat's own service.bat command file to perform the actual service installation. Because of this a couple of important restrictions exist: 1. | If a service name is specified that service name must be alpha-numeric only. Failure to do so, such as hyphenating (svm-demo), or the use of the underscore (svm_demo), will result in the service failing to install with a terse Windows dialog similar to: |  | 2. | To correctly install a service the command file install_tomcat_service.bat , or more specifically svmconf.bat needs to set up a number of environment variables for Tomcat's service.bat to use. Of these svmconf.bat will attempt to set up either the variables JRE_HOME or JAVA_HOME . These define the location of either the Java Runtime Environment or the Java SDK to be used by this Tomcat instance. The definition of JAVA_HOME takes precedence when service.bat is called. If command shell used to execute install_tomcat_service.bat already defines JAVA_HOME and/or JRE_HOME then these will be used in place of the version installed with ServiceManager. In the case where JAVA_HOME and/or JRE_HOME are already defined it is incumbent on the installation engineer to ensure that these reference a supported Java version or are reset prior to this service installation process. |
|
Registry Settings | When installed as a service Tomcat updates the host machine's registry settings. It adds a set of entries under the key: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\<service_name> By default the service name is Tomcat5, though this can be changed during installation. Once installed as a service Tomcat conforms to the standard Windows service interaction tools, consult your Windows administration guide for further details. To run from the command line requires Tomcat to have been installed as a service. Once installed, command line execution is simply a case of executing tomcat5.exe :
> c:
> cd "Program Files\ServicePower\SERVICEManager\tomcat\bin"
> tomcat5
Note that tomcat5 doesn't need to execute from within a svmconf shell, because all the appropriate application parameters have been specified within the registry (see above). A side effect of installing Tomcat as a service is that a number of registry settings are created. To ensure correct operation the Tomcat executable must use the settings it was installed with. That is if Tomcat was installed with a specific service name, then when executed from the command line tomcat5 must be passed this service name as a command line parameter in the format //TS//<service_name> . For example assuming the service name should be svm-demo. To install the service:
> c:
> cd "\Program Files\ServicePower\SERVICEManager"
> install_tomcat_service install svmdemo
And to run from the command line:
> c:
> cd "\Program Files\ServicePower\SERVICEManager\tomcat\bin"
> tomcat5 //TS//svmdemo
For further configuration of Tomcat please consult the appropriate online documentation |
Service Execution |
Command Line Execution |
Command Line Execution and Service Naming |
Post Installation Modification of Tomcat Parameters | Once correctly installed (as a service) it is possible to review, and change, the Tomcat configuration settings via the supplied tomcat5w executable located within the tomcat\bin directory. Once launched a control panel is displayed. The tab entitled Java (the forth tab) contains the interface to change the registry-based installation settings. From here the user can not only modify the memory footprint of the Tomcat instance, but also specify the JVM with additional arguments. Where: | Default | Description |
---|
Use default | Unchecked | When checked execution of this Tomcat instance will result in the attempted use of the host machine's default Java installation. The ServiceManager installation includes the latest Java environment it has been validated against. | Java Virtual Machine | ServiceManager Installed JVM | The location of the user-specified Java environment to be used by this Tomcat installation. This location is automatically defined as a result of completing the Tomcat service installation procedure (see 4.4.1.1). | Java Classpath | ServiceManager Installed classpath | This entry defines the standard classpath used by this Tomcat installation. The classpath dictates the location of Java libraries used by a given application. There are no special entries for ServiceManager, consequently this should not require editing. | Java Options | ServiceManager installed defaults | | Initial Memory Pool | 256 Mbytes | This setting may be changed. This defines the amount of memory to be initially reserved for Tomcat's use. | Maximum Memory Pool | 1024 Mbytes | This setting may be changed. This defines the upper limit to the amount of physical memory the Tomcat application server may request from the underlying operating system. This value should always be larger than the Initial Memory Pool entry. During Tomcat's service installation ServiceManager reserves the current maximum memory footprint. | Thread stack size | Not used | This is an obsolete setting retained for compatibility with earlier JVMs. |
Using tomcat5w.exe With a Service NameIf Tomcat has been installed using a different service name (see previous section) then tomcat5w.exe requires the command line parameter //MS//<service_name> to successfully launch it against the appropriate target Tomcat installation. This is required because tomcat5w.exe will use the service name to retrieve the appropriate registry settings. Further more, when running tomcat5w.exe in this manner the control panel is not presented by default, rather tomcat5w.exe executes silently with the Tomcat system-tray icon visible. To bring the control panel to the foreground the "Configure..." context menu item must be selected. 
|  |