Deploy Rational Change 5.2 and later on an Apache Tomcat

IBM Rational Change 5.2 includes the Jetty 5.1.14 web server, and you can also deploy it with IBM WebSphere Application Server or WebSphere Application Server Community Edition. However, there is no option in the installer to deploy Rational Change on a Tomcat server. This article explains how to do that.

Share:

Pradeep K. Shashidhar (pradeep.shashidhar@in.ibm.com), Advisory Software Engineer, IBM

author photoPradeep Shashidhar has ten years of experience in product development with nearly five years of experience in Rational Change development. He also has experience in Java and Java Enterprise Edition (JEE), Perl, PHP and .NET technologies. His expertise is in change and configuration management tools, payment, and e-learning domains.



24 July 2012

Also available in Russian

IBM® Rational® Change 5.2 is includes the Jetty 5.1.14 web server. You can also deploy it with IBM WebSphere Application Server or WebSphere Application Server Community Edition. However, there is no option in the installer to deploy Rational Change on an Apache Tomcat server. This article explains how to deploy Rational Change 5.2 on Tomcat 5.5 with the IBM Java Runtime Environment, Version 6.0 (JRE 6).

Deploy Rational Change 5.2 on Tomcat 5.5 with IBM JRE 6.0

Install pre-requisite Rational Change service pack 5.2.0.2

  1. Install Rational Change 5.2, and choose Jetty from the server dialog window in the installer.

    Jetty components are embedded in the installer. Therefore, the installer copies both Rational Change and Jetty components to the file systems.
  2. Start Rational Change deployed on Jetty by running csctl.sh (for UNIX) or services (for Microsoft Windows).
  3. Access the admin login page of Rational Change:
    http://hostname:port/context/admin (italic = variables)

    Use the unique port and context value provided during installation.
  4. While accessing the Rational Change admin login page for the first time, it opens the Rational Directory Server (RDS) configuration page. Provide the RDS connection information.

    You will see the RDS credentials page only the first time. After the connection is established, you will be directed to the admin login page. The connection details will persist in the wsconfig/rds_config.xml file.
  5. On the Rational Change admin login page, provide the required credentials and log in.
  6. Extract the Rational Change 5.2.0.2 patch, and install it through the Package Installer tab. (Follow the README.txt file instructions to install the service pack).
  7. Shut down the Jetty server. This will pick the new libraries provided in 5.2.0.2 service pack.

Edit Rational Change configuration files for Tomcat 5.5

  1. Copy the Rational Change directory from CHANGE_APP_HOME\jetty\webapps\ to the TOMCAT_HOME\webapps\ directory.

    Tip:
    Ignore the install.log while copying.

    The Rational Change folder name under webapps is the same as the context name provided during installation. As mentioned earlier, the installation will have Jetty and Rational Change components. Only the Rational Change components need to be copied to the Tomcat installation area. Example: When installing Rational Change on Jetty, if you created a context foo that is installed under C:\Program Files\Change52, copy the foo directory from this directory:
    C:\Program Files\Change52\jetty\webapps\

    to the

    TOMCAT_HOME\webapps\ directory
  2. Add a new <context-param> tag, with a param name and value, to the web.xml file that is available in TOMCAT_HOME\webapps\context name\WEB-INF\.

    The context name must be preceded with a slash (/). For example:
            <context-param>
    		<param-name>context</param-name>
    		<param-value>/foo</param-value>
    	</context-param>

    The servlet API to fetch context value is not available with the servlet specification available with Tomcat 5.5. The context value is passed to Rational Change explicitly through the entry in the web.xml file.
  3. Remove the servlet mapping tag mentioned below from the web.xml file that in TOMCAT_HOME\webapps\context name\WEB-INF\:
    	<servlet-mapping>
    		<servlet-name>action</servlet-name>
    		<url-pattern>/</url-pattern>
    	</servlet-mapping>
  4. Update the port value in the web.xml file. For example:
    	<context-param>
    		<param-name>port</param-name>
    		<param-value>8080</param-value>
    	</context-param>

    The port value in web.xml file needs to be updated with the one where Tomcat is listening. 8080 is the default port value in Tomcat.
  5. Update the ehcache.xml file that is in TOMCAT_HOME\webapps\contextName\WEB-INF\classes\ to change the value of the path attribute within the diskStore tag.

    The new value must be:TOMCAT_HOME\webapps\contextName\WEB-INF\wsconfig\tmpdir
  6. (Optional) Edit the TOMCAT_HOME\conf\server.xml file to enable request logging. Remove the comment around the Valve tag that uses the AccessLogValve class and edit the attributes if required.

    	<!--
    	<Valve className="org.apache.catalina.valves.AccessLogValve"
    	directory="logs"  prefix="localhost_access_log." suffix=".txt"
    	pattern="common" resolveHosts="false"/>
            -->
    Note:
    This step is optional. To learn more about the AccessLogValve, follow the instructions in The Valve Component section of the Apache Tomcat Configuration Reference on the Apache.org website (see the Resources section here for a link).

    This is an example of Valve element modified for the Rational Change application:
     <Valve className="org.apache.catalina.valves.AccessLogValve"
     directory="logs"
     fileDateFormat="yyyy-MM-dd"
     prefix="access_log."
     suffix=".log"
     pattern="%h %t &quot;%m %U&quot; &quot;%{Referer}i&quot;
     &quot;%{User-Agent}i&quot; %s %b %D %{CSInfoCookie}c"
     resolveHosts="false"/>
  7. Restart the Tomcat server.

Access Rational Change 5.2 from Tomcat 5.5

  1. Access the application with this URL:
    http://hostname:port/context/admin
  2. Use the updated port number in the URL. The new port value is the one where Tomcat is listening.
  3. Uninstall the instance of Rational Change that was installed using Jetty.

Deploy Rational Change 5.2 on Tomcat 6.0 with IBM JRE 6.0

  1. Choose any instance (fresh or existing) of Rational Change 5.2 installed with Jetty.

    The instance can be Rational Change 5.2 with or without any service packs or patches installed.
  2. Copy the Rational Change directory available under
    <CHANGE_APP_HOME>\jetty\webapps\
    to this directory:

    TOMCAT_HOME\webapps\

    Tip:
    Ignore the install.log while copying.

    The Rational Change folder name under webapps is the same as the context name provided during installation. As mentioned earlier, installation will have Jetty and Rational Change components, but you need to copy only the Rational Change components to Tomcat installation area. For example, if you created a context foo when installing Rational Change on Jetty, assuming that it is installed under C:\Program Files\Change52, copy the foo directory from this directory:

    C:\Program Files\Change52\jetty\webapps\
    to this directory:

    TOMCAT_HOME\webapps\
  3. Remove this servlet mapping tag from the web.xml file that is available in TOMCAT_HOME\webapps\context name\WEB-INF\:
    	<servlet-mapping>
    		<servlet-name>action</servlet-name>
    		<url-pattern>/</url-pattern>
    	</servlet-mapping>
  4. Update the port value in the web.xml file. For example:
    	<context-param>
    		<param-name>port</param-name>
    		<param-value>8080</param-value>
    	</context-param>

    The port value in the web.xml file needs to be updated with the where Tomcat is listening. 8080 is the default port value in Tomcat.
  5. Update the ehcache.xml that is available in TOMCAT_HOME\webapps\contextName\WEB-INF\classes\ to change the value of the path attribute within the diskStore tag. The new value must be:

    TOMCAT_HOME\webapps\contextName\WEB-INF\wsconfig\tmpdir
  6. (Optional) Edit the TOMCAT_HOME\conf\server.xml file to enable request logging. Remove the comment around the Valve tag that uses the AccessLogValve class, and edit the attributes if necessary. Example:
    	<!—
    	<Valve className="org.apache.catalina.valves.AccessLogValve"
    	directory="logs"  prefix="localhost_access_log." suffix=".txt"
    	pattern="common" resolveHosts="false"/>
    	   -->
    Note:
    This step is optional. To learn more about the AccessLogValve, follow the link http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html. This is an example of the Valve element modified for Rational Change:
    <Valve className="org.apache.catalina.valves.AccessLogValve"
     directory="logs"
     fileDateFormat="yyyy-MM-dd"
     prefix="access_log."
     suffix=".log"
     pattern="%h %t &quot;%m %U&quot; &quot;%{Referer}i&quot;
     &quot;%{User-Agent}i&quot; %s %b %D %{CSInfoCookie}c"
     resolveHosts="false"/>
  7. Restart the Tomcat server.
  8. Access the application with this URL:
    http://hostname:port/context/admin

    Use the updated port number in the URL. The new port value is the one where Tomcat is listening.
  9. Uninstall the instance of Rational Change that was installed using Jetty.

Configure Tomcat to use the JRE bundled with Rational Synergy

Windows

Service mode

  1. If Tomcat is configured to start in service mode, launch the Apache Tomcat Properties dialog by clicking tomcat5w.exe or tomcat6w.exe from the TOMCAT_HOME\bin directory.
  2. Click the Java tab, and specify the path of the jvm.dll file. For example, in Java Virtual Machine field:

    SYNERGY_HOME\jre\bin\classic\jvm.dll

Startup script

  1. If Tomcat is configured to start through a startup script in TOMCAT_HOME\bin\startup.bat, set the value for JRE_HOME by editing the TOMCAT_HOME\bin\setenv.bat script. If the setenv.bat script does not exist, you must create a new one under the TOMCAT_HOME\bin\ directory.
  2. Copy this line to the beginning of the script file:
    set JRE_HOME="<SYNERGY_HOME>\jre"

UNIX

Startup script

  1. Set the value for JRE_HOME by editing the TOMCAT_HOME/bin/setenv.sh script. If the setenv.sh script does not exist, you must create a new one under the TOMCAT_HOME/bin/ directory.
  2. Copy this line to the beginning of script file:
    JRE_HOME="<SYNERGY_HOME>/jre"; export JRE_HOME

Specify Java options and memory settings on Tomcat

Windows

Service mode

  1. If Tomcat is configured to start in service mode, launch the Tomcat Properties Dialog by clicking tomcat5w.exe or tomcat6w.exe from the TOMCAT_HOME\bin directory.
  2. Click the Java tab to specify Java Options and Memory Settings.

Startup script

  1. If Tomcat is configured to start through startup script in TOMCAT_HOME\bin\startup.bat, set the value to the CATALINA_OPTS variable by copying this line to the beginning of the TOMCAT_HOME\bin\setenv.bat script file.
    set CATALINA_OPTS="-Xms128m -Xmx512m"

    As before, if the setenv.bat script does not exist, you must create a new one under the TOMCAT_HOME\bin\ directory.

UNIX

Startup script

  1. Set the value to variable CATALINA_OPTS by editing the TOMCAT_HOME/bin/setenv.sh script. If the setenv.sh script does not exist, you must create a new one under the TOMCAT_HOME/bin/ directory.
  2. Copy this line to the beginning of the script file:
    CATALINA_OPTS="-Xms128m -Xmx512m"; export CATALINA_OPTS

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=826699
ArticleTitle=Deploy Rational Change 5.2 and later on an Apache Tomcat
publish-date=07242012