Migrating a version 4.0 data access application to version 5.1

Why and when to perform this task

In order to utilize the connection management infrastructure in WebSphere Application Server Version 5.1, you must package your application as a J2EE 1.3 application. This means repackaging your web modules to the 2.3 Specification and your EJB modules to the 2.0 Specification before installing them into WebSphere Application Server.

Converting a 2.2 web module to a 2.3 web module

Why and when to perform this task

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

Steps for this task

  1. Open the Application Assembly Tool.
  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 WebSphere 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. When you have added 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. When you have added 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 WebSphere 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, excluding META-INF and WEB-INF, and click Add.
    6. When you have added all of the required resource files, clickOK.
  6. Import your Web Components.
    1. Right click on Web Components and select Import.
    2. In the Import Components window click Browse.
    3. Navigate to your WebSphere 4.0 EAR file and click Open.
    4. In the left top pane of the Import Components window highlight the WAR file you are migrating.
    5. Highlight each of the components displayed in the right top pane and click Add.
    6. When all of your web components show up 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. Fill in 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.0 EJB module

Why and when to perform this task

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

Steps for this task

  1. Open the Assembly Toolkit.
  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 WebSphere 4.0 EAR file and click Select.
    4. In the upper left pane of the Add Files window, navigate to your EJB JAR file.
    5. Select each of the directories and class files and click Add.
    6. When you have added 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 WebSphere Studio 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 by selecting 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

Steps for this task

  1. Open the Assembly Toolkit.
  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. Fill in any other Application properties. Click Help for a description of the settings.
  6. Save the EAR file.

Installing the Application in WebSphere

Steps for this task

  1. Create a JDBC provider and a Version 5.1 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 binding the resource references to the data source you created.

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



Searchable topic ID:   migdaapp
Last updated: Jun 21, 2007 4:12:58 PM CDT    WebSphere Application Server Express, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/tdat_migdaapp.html

Library | Support | Terms of Use | Feedback