Jazz Library TN0017: Configuring Jazz Team Server to use JEE Data Sources in WebSphere Application Server
Author name

TN0017: Configuring Jazz Team Server to use JEE Data Sources in WebSphere Application Server

Last Updated: June 24, 2009
Author: Matt Lavin

Summary

Jazz Team Server includes the ability to connect to databases using Java Enterprise Edition (JEE) Data Sources defined in the application server, but it takes a little extra configuration compared to using the default direct JDBC method. This note walks you through the additional steps necessary to configure Jazz Team Server to use a JEE data source configured in WebSphere Application Server.

See the “References” section below for a link to background information on JEE Data Sources in WebSphere Application Server.

More Information

Prerequisites

  1. Make sure your database is initialized to run Jazz Team Server. If it’s not, use repotools initialize the target database before continuing. See the “Setting up the database” section in the install documentation for detailed instructions on setting up a database for Jazz Team Server.
  2. Create a JDBC Provider in Integrated Solutions Console (see the “References” section for a link to detailed documentation on configuring JDBC providers in WebSphere Application Server).
  3. Ensure that the DB vendor’s JAR files are accessible to Jazz Team Server. You must copy the DB vendor’s JAR files to <WAS-install>/AppServer/java/jre/lib/ext to avoid classloading issues (caused by using direct reference from inside an OSGi environment). If you are using DB2 then the JARs to copy are db2jcc.jar and db2jcc_license_cu.jar

Setup Data Source in WebSphere Application Server

WebSphere Application Server v6.1 supports two versions of Data Sources called “V4 Data Sources” and “V5 Data Sources”. “V4” and “V5” in this context refer to the Data Source version, not the version of WebSphere Application Server. For more information on the different types of Data Sources that WebSphere Application Server supports, see the Data Sources doc linked to from the References section below

V4 Data Source can be used without any modification to Jazz Team Server, and a V5 Data Source takes a small modification to Jazz Team Server’s web.xml to work.

Create the Data Source in Integrated Solutions Console

Using the Integrated Solutions Console, create a Data Source that connects to the databases that is configured to contain Jazz Team Server. After the Data Source has been defined, you should use the ‘Test Connection’ feature in Integrated Solutions Console to verify that your Data Source can connect to the database backing the Jazz Repository.

Modifying Jazz Team Server to support a V5 Data Source (Only required for RTC 1.0)

When using RTC 1.0 and a V5 Data Source is desired, the web.xml for Jazz Team Server must be modified to update the servlet version. The following steps will let you update the web.xml for Jazz Team Server after it has been installed into WebSphere Application Server:
  1. Open the Integrated Solutions Console in a web browser
  2. Goto the Applications > Enterprise Applications page.
  3. Click on the jazz application.
  4. Select ‘Manage Modules’, located on the right side of the page
  5. Check jazz.war and click ‘Export File’
  6. Select WEB-INF/web.xml and click ‘Export’
  7. Open the web.xml file in a text editor, and replace the line that had:
    <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN” “http://java.sun.com/j2ee/dtds/web-app_2_2.dtd”>
    with
    <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”>
    and save the file.
  8. In the browser, go the back to the Applications > Enterprise Applications page.
  9. Select on the jazz application and click ‘Update’
  10. Select the “Replace or add a single file” radio button option.
  11. In the “Specify the path beginning with the installed application archive file to the file to be replaced or added.” entry field, enter jazz.warWEB-INFweb.xml.
  12. Click the browse button and select the same web.xml that was modified in an earlier step.
  13. Click next and follow through until the application has been saved.
  14. Go back to the Applications->Enterprise Applications page and stop and start the jazz_war application.

Configure Jazz Team Server to use JEE Data Source

The following instructions assume that the Jazz server is running on localhost.

  1. Open https://localhost:9443/jazz/setup in a web browser.
  2. Click ‘Custom Setup’
  3. Under ‘Configure Database Vendor and Connection Type’ select DB2 for the vendor, and JEE for the Connection Type
  4. Set the value of JEE Data source property to be the JNDI name for the Data source. The JNDI name should be exactly what shows up in the list of Data sources in the Integrated Solutions Console of WebSphere Application Server.
  5. Click ‘Test Connection’ button to ensure that the JNDI name is correct and then advance through the rest of the wizard to save the changes.
At this point, the server has reconfigured and can be used by your team.

References

This topic is also discussed:

  • Data Sources (WebSphere Application Server v6.1 Online Help) – Provides a conceptual overview of JEE Data Sources and the options for using them in WebSphere Application Server v6.1.
  • Configuring a JDBC provider and data source (WebSphere Application Server v6.1 Online Help) – Detailed procedure for configuring JDBC providers in WebSphere Application Server
Wed, 24 Jun 2009