Migrate a V4.0 data access application to v6

 

Overview

To use the connection management infrastructure in WebSphere Application Server v6, package your application as a J2EE 1.3 (or later) application. This process involves repackaging your Web modules to the 2.3 specification and your EJB modules to the 2.1 specification before installing them onto WebSphere Application Server.

 

See also


Connection considerations when migrating servlets, JavaServer Pages, or enterprise session beans

Converting a 2.2 Web module to a 2.3 Web module

 

Overview

Use the following steps to migrate each of your Web modules.

 

Procedure

  1. Open an assembly tool such as the Application Server Toolkit (AST) or Rational Web Developer.

  2. Create a new Web module by selecting File > New > Web Module.

  3. Add any required class files to the new module.

    1. Expand the Files portion of the tree.

    2. Right-click Class Files and select Add Files.

    3. In the Add Files window, click Browse.

    4. Navigate to your WAS 4.0 EAR file and click Select.

    5. In the upper left pane of the Add Files window, navigate to your WAR file and expand the WEB-INF and classes directories.

    6. Select each of the directories and files in the classes directory and click Add.

    7. After you add all of the required class files, click OK.

  4. Add any required JAR files to the new module.

    1. Expand the Files portion of the tree.

    2. Right-click Jar Files and select Add Files.

    3. Navigate to your WebSphere 4.0 EAR file and click Select.

    4. In the upper left pane of the Add Files window, navigate to your WAR file and expand the WEB-INF and lib directories.

    5. Select each JAR file and click Add.

    6. After you add all of the required JAR files, clickOK.

  5. Add any required resource files, such as HTML files, JSP files, GIFs, and so on, to the new module.

    1. Expand the Files portion of the tree.

    2. Right-click Resource Files and select Add Files.

    3. Navigate to your WAS 4.0 EAR file and click Select.

    4. In the upper left pane of the Add Files window, navigate to your WAR file.

    5. Select each of the directories and files in the WAR file, excluding META-INF and WEB-INF, and click Add.

    6. After you add all of the required resource files, clickOK.

  6. Import your Web components.

    1. Right-click Web Components and select Import.

    2. In the Import Components window click Browse.

    3. Navigate to your WAS 4.0 EAR file and click Open.

    4. In the left top pane of the Import Components window, highlight the WAR file that you are migrating.

    5. Highlight each of the components that display in the right top pane and click Add.

    6. When all of your Web components display in the Selected Components pane of the window, click OK.

    7. Verify that your Web components are correctly imported under the Web Components section of your new Web module.

  7. Add servlet mappings for each of your Web components.

    1. Right-click Servlet Mappings and select New.

    2. Identify a URL pattern for the Web component.

    3. Select the web component from the Servlet drop-down box.

    4. Click OK.

  8. Add any necessary resource references by following the instructions in Creating a resource reference.

  9. Add any other Web module properties that are required. Click Help for a description of the settings.

  10. Save the Web module.

Converting a 1.1 EJB module to a 2.1 EJB module (or later)

 

Overview

Use the following steps to migrate each of your EJB modules.

 

Procedure

  1. Open an assembly tool.

  2. Create a new EJB Module by selecting File > New > EJB Module.

  3. Add any required class files to the new module.

    1. Right-click Files object and select Add Files.

    2. In the Add Files window click Browse.

    3. Navigate to your WAS 4.0 EAR file and click Select.

    4. In the upper left pane of the Add Files window, navigate to your enterprise bean JAR file.

    5. Select each of the directories and class files and click Add.

    6. After you add all of the required class files, click OK.

  4. Create your session beans and entity beans. To find help on this subject, see Migrating enterprise bean code to the supported specification, the documentation for Rational Application Developer, or the documentation for WebSphere Studio Application Developer Integration Edition.

  5. Add any necessary resource references by following the instructions in Creating a resource reference.

  6. Add any other EJB module properties that are required. Click Help for a description of the settings.

  7. Save the EJB module.

  8. Generate the deployed code for the EJB module by clicking File > Generate Code for Deployment.

  9. Fill in the appropriate fields and click Generate Now.

Add the EJB modules and Web modules to an EAR file

 

Procedure

  1. Open anassembly tool.

  2. Create a new Application by selecting File > New > Application.

  3. Add each of your EJB modules.

    1. Right-click EJB Modules and select Import.

    2. Navigate to your converted EJB module and click Open.

    3. Click OK.

  4. Add each of your Web modules.

    1. Right-click Web Modules and select Import.

    2. Navigate to your converted Web module and click Open.

    3. Fill in a Context root and click OK.

  5. Identify any other application properties. Click Help for a description of the settings.

  6. Save the EAR file.

Installing the Application on WebSphere Application Server

 

Procedure

  1. Create a JDBC provider and a data source object following the instructions in Creating a JDBC provider and data source.

  2. Install the application, following the instructions in Installing a new application and bind the resource references to the data source that you created.