Summary: Although not part of the scope of the CAST AIP installation Guide, the following sections provide a brief explanation of the Windows environment installation process for the Apache Tomcat and IBM Websphere J2EE compliant application servers and the JDK/JRE. In addition, there is a chapter discussing memory configuration for the Java JVM and Oracle Application Server.
This documentation is simply for reference only.
JDK / JRE install for Apache Tomcat
- Download the required JDK/JRE as specified in the section Application Servers in Supported Platforms.
- Install the JDK/JRE.
- Create a SYSTEM environment variable named JAVA_HOME. This is the directory where the JDK/JRE is installed (i.e. c:\Java\jre)
- Update the PATH system environment variable by adding %JAVA_HOME%\bin at the beginning of the list of paths
- Open a command prompt (Start -> Run -> cmd)
- Type "java -version" and verify that the correct java version is installed
Apache Tomcat installation process
- Download the required Tomcat version as specified in the section Application Servers in Supported Platforms.
- Unzip and run the setup file on your hard drive (i.e. in c:\Java\Tomcat) - please make sure that the installation path does not contain any spaces.
- Create a SYSTEM environment variable called CATALINA_HOME. This should be set to the directory where Tomcat has been installed (i.e. c:\Java\Tomcat)
- Execute the startup.bat file located in the %CATALINA_HOME%\bin directory
- Open your web browser and go to http://YOUR_SERVER_NAME:8080/
- If the installation was successful, the Tomcat homepage should be displayed.
- In some circumstances, an existing service on the host machine may use the default port 8080. If this is the case, you need to change the port used by Apache Tomcat. To do so, access the file "%CATALINA_HOME%\conf\server.xml" and search for 8080. Change this to another number not already in use on your machine.
- You will need to restart Tomcat for these changes to take effect.
Websphere 6.1 installation
- Download a copy of Websphere 6.1 - if you are downloading from the IBM website, then the zip file will normally be downloaded to C:\DownloadDirector
- Extract the zip file to a location of your choice
- Navigate into the extracted zip file and execute the file launchpad.exe - this will launch the Websphere Installation Wizard
- In the Wizard, choose the option Launch the installation wizard for WebSphere Application Server
- When the wizard initializes, first click Next to continue
- In the next screen, accept the Software License Agreement and click Next
- In the next screen the installation wizard will carry out a system prerequisite check. Make sure that the check succeeds. Note that you may receive an error if you are attempting to install Websphere 6.1 on Windows XP with SP3 - the system prerequisite check does not recognize SP3 and therefore the check fails. Click Next to continue.
- In the next screen, you can choose whether to install sample applications. Unless you specifically need these, leave the check box blank and click Next.
- In the next screen you can choose the installation directory. Unless you want to modify the default location, click Next.
- In the next screen, you can enable Administrative Security (CAST recommends doing so) to enable authentication when administering the application server - leave the check box ticked. You then need to create a username and password combination - enter these in the appropriate fields and click Next to continue.
- A summary of the installation configuration is then displayed. If you are happy with the options, click Next (if not, click Back and modify the options)
- The installation process will then start. When complete the First Steps console will be displayed.
Server start up
- In the First Steps console, choose the option Start the server
Application server performance considerations
It may be necessary to modify the default memory settings for your J2EE compliant application server to improve the performance of your deployed web applications. This section discusses:
- JVM configuration settings for Apache Tomcat
- Memory configuration for Oracle Application Server
Recommendations for application server memory allocation
CAST recommends the following forumla for determining the maximum memory allocation to configure on your application server:
Memory configuration settings for Apache Tomcat
In some circumstances, whilst using a CAST web application, you may receive Low Memory/Recovered Memory/Out of Memory errors or exceptions, for example:
These errors and exceptions are displayed by the Java Virtual Machine and they indicate that the Java Garbage Collector is in operation. As a result, you may see a slow down in performance. You can ignore these errors, however, if they persist, it is possible to modify the JVM memory configuration settings on the machine hosting the Apache Tomcat server to resolve the problem.
The procedure for modifying the JVM memory settings is dependent on how you have installed Tomcat - either as a service or standalone (launched via the command line).
Installed as a service
If you have installed Apache Tomcat as a service, the process "Tomcat7.exe" or "Tomcat8.exe" will be visible in the Processes tab in Windows Task Manager. To modify the JVM memory configuration:
- Stop the Apache Tomcat service
- Execute the Tomcat7w.exe or Tomcat8w.exe file located at c:\Program Files\Apache Software Foundation\bin or your equivalent installation location
- Select the Java tab as shown below:
- Alter (or add) memory configuration settings as follows: Initial memory pool = 512MB, Maximum memory pool = 512MB (these are the minimum values that CAST recommends - you should increase these values until your low memory/out of memory exceptions have been resolved).
- Click Apply and then OK to confirm the modification to the JVM memory settings
- Restart Tomcat to use the new settings
Installed as a standalone program
If Apache Tomcat is installed as a standalone program and is launched from the command line, the process "Java.exe" will be visible in the Processes tab in Windows Task Manager. To modify the JVM memory configuration, CAST recommends using a wrapper script file with the following parameter line:
This will set the JVM memory configuration settings as follows: - Initial memory pool = 512MB, - Maximum memory pool = 512MB (these are the minimum values that CAST recommends - you should increase these values until your low memory/out of memory exceptions have been resolved).
An example wrapper script to launch Apache Tomcat with the above configuration is shown below (modify to suit your own environment):
Memory configuration for Oracle Application Server
In some circumstances, whilst using the CAST Engineering Dashboard and/or the Discovery Portal, you may receive Low Memory/Recovered Memory/Out of Memory errors or exceptions. As a result, you may see a slow down in performance. You can ignore these errors, however, if they persist, it is possible to modify the Oracle Application Server memory configuration settings to resolve the problem.
Increase the heap size for the OC4J process
Use the following script to increase the heap size for the OC4J process to the required amount at startup (the following increases the heap size to 512MB):
If your application is running in an OPMN managed environment, these JVM settings are defined within a <data id="java-options"> tag in the opmn.xml configuration file. For example, increase the value marked in red:
If your application is running on a UNIX or Linux system, verify that ulimit settings allow the JVM process to allocate this much memory. For a standard installation you can find opmn.xml in INSTALL_DIRECTORY\opmn\conf
CAST highly recommends that the application server is configured to restart automatically on a regular basis (every night for example, or when not in use). This will clear any potential memory issues.
Note that when restarting the application server, the data cache used for the CAST Application Analytics and Engineering Dashboards will also be cleared, therefore the first user to connect may have degraded performance until this cache is repopulated.