Skip navigation

Integrations - Websphere

Article Rating?

Product Type Container
Versions Supported 6.1.0.7 (6.1 base version, fix pack 7)
Module Status Included with Terracotta kit
Module Availability - Released (latest) Not Applicable
Module Availability - SNAPSHOT (latest) Not Applicable
Download with Kit See latest Terracotta Kit

Introduction

IBM WebSphere Application Server is a JEE-compliant application server. Clustering enterprise and web applications, and HTTP session clustering, are supported in a Terracotta DSO integration.

Dependencies

IBM WebSphere Application Server must be running on a 32-bit x86 Linux machine.
For detailed version information, see Platform Support.

Implementation

Terracotta Configuration

To enable application clustering for the IBM WebSphere Application Server, add the WebSphere configuration module to the tc-config.xml file:

<modules>
    <module name="clustered-websphere-6.1.0.7" version="2.6.0"/>
</modules>

In this case, the module version matches the version of Terracotta DSO you are using. If you are using Terrcacotta DSO 2.5.4, set the version attribute to 2.5.4.

To enable HTTP session clustering, add your application name(s) to the <web-applications> element in the tc-config.xml file. For example, two applications with WebSphere context roots of /MyServlet and /some/path/MyOtherServlet require the following entries:

<web-applications>
  <web-application>MyServlet</web-application>
  <web-application>some/path/MyOtherServlet</web-application>
</web-applications>

The name of the application should be its context root as defined in the WebSphere configuration, or:

  • The context root defined with the <context-root> element in the application.xml file if your web application is deployed using an EAR file;
  • the base name of the web application's .war file if you do not have a context root defined;
  • the special value "ROOT" (without quotation marks) which is taken as the equivalent of "/".

WebSphere Application Server configuration

Permissions

The file WAS_HOME/profiles/PROFILE_NAME/properties/server.policy should contain the following content:

grant codeBase "file:<TC_INSTALL_DIR>/lib/-" {
      permission java.security.AllPermission;
};

grant codeBase "file:<TC_INSTALL_DIR>/lib/dso-boot/-" {
      permission java.security.AllPermission;
};

The embedded string <TC_INSTALL_DIR> must be the full path to the Terracotta installation directory.

Enabling Terracotta

In the WebSphere administrative console, add the following options to the generic JVM arguments for the application server:

  • -Xshareclasses:none
  • -Xbootclasspath/p:<TC_INSTALL_DIR>/lib/dso-boot/<BOOT_JAR_NAME>
  • -Dtc.install-root=<TC_INSTALL_DIR>
  • -Dtc.config=<PATH_TO_tc-config.xml>

The variables <TC_INSTALL_DIR> and <PATH_TO_tc-config.xml> should be full paths, and <BOOT_JAR_NAME> should correspond to the correct boot jar name. You can use the <TC_INSTALL_DIR>/bin/make-boot-jar.sh command to generate the boot jar.

For more information on configuring the WebSphere application server, see the WebSphere server documentation.

Known Issues

  1. Class sharing: Terracotta DSO currently does not support class sharing; when this IBM JDK option is enabled the bytes of shared classes are unavailable to instrument at runtime. A workaround is to use the -Xshareclasses:none option when starting WebSphere (see Enabling Terracotta for instructions). Details about how this will be addressed in future releases is in the JIRA issue CDV-254.
  2. IBM JDK SR4: the java.lang.util.concurrent.locks.AbstractQueuedSynchronizer.fullGetQueuedThread() method could potentially run into an infinite loop (refer to Sun bug 6241823 for details). This class is being used by several classes such as java.util.concurrent.locks.ReentrantReadWriteLock. This remains a problem in the SR5 release of the IBM JDK. Later versions have not been tested.
  3. Spring: Terracotta for Spring is not currently supported in the IBM JDK environment.

Adaptavist Theme Builder Powered by Atlassian Confluence