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
- Open an assembly tool such as the Application Server Toolkit (AST) or Rational Web Developer.
- Create a new Web module by selecting File > New > Web Module.
- Add any required class files to the new module.
- Expand the Files portion of the tree.
- Right-click Class Files and select Add Files.
- In the Add Files window, click Browse.
- Navigate to your WAS 4.0 EAR file and click Select.
- In the upper left pane of the Add Files window, navigate to your WAR file and expand the WEB-INF and classes directories.
- Select each of the directories and files in the classes directory and click Add.
- After you add all of the required class files, click OK.
- Add any required JAR files to the new module.
- Expand the Files portion of the tree.
- Right-click Jar Files and select Add Files.
- Navigate to your WebSphere 4.0 EAR file and click Select.
- In the upper left pane of the Add Files window, navigate to your WAR file and expand the WEB-INF and lib directories.
- Select each JAR file and click Add.
- After you add all of the required JAR files, clickOK.
- Add any required resource files, such as HTML files, JSP files, GIFs, and so on, to the new module.
- Expand the Files portion of the tree.
- Right-click Resource Files and select Add Files.
- Navigate to your WAS 4.0 EAR file and click Select.
- In the upper left pane of the Add Files window, navigate to your WAR file.
- Select each of the directories and files in the WAR file, excluding META-INF and WEB-INF, and click Add.
- After you add all of the required resource files, clickOK.
- Import your Web components.
- Right-click Web Components and select Import.
- In the Import Components window click Browse.
- Navigate to your WAS 4.0 EAR file and click Open.
- In the left top pane of the Import Components window, highlight the WAR file that you are migrating.
- Highlight each of the components that display in the right top pane and click Add.
- When all of your Web components display in the Selected Components pane of the window, click OK.
- Verify that your Web components are correctly imported under the Web Components section of your new Web module.
- Add servlet mappings for each of your Web components.
- Right-click Servlet Mappings and select New.
- Identify a URL pattern for the Web component.
- Select the web component from the Servlet drop-down box.
- Click OK.
- Add any necessary resource references by following the instructions in Creating a resource reference.
- Add any other Web module properties that are required. Click Help for a description of the settings.
- 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
- Open an assembly tool.
- Create a new EJB Module by selecting File > New > EJB Module.
- Add any required class files to the new module.
- Right-click Files object and select Add Files.
- In the Add Files window click Browse.
- Navigate to your WAS 4.0 EAR file and click Select.
- In the upper left pane of the Add Files window, navigate to your enterprise bean JAR file.
- Select each of the directories and class files and click Add.
- After you add all of the required class files, click OK.
- 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.
- Add any necessary resource references by following the instructions in Creating a resource reference.
- Add any other EJB module properties that are required. Click Help for a description of the settings.
- Save the EJB module.
- Generate the deployed code for the EJB module by clicking File > Generate Code for Deployment.
- Fill in the appropriate fields and click Generate Now.
Add the EJB modules and Web modules to an EAR file
Procedure
- Open anassembly tool.
- Create a new Application by selecting File > New > Application.
- Add each of your EJB modules.
- Right-click EJB Modules and select Import.
- Navigate to your converted EJB module and click Open.
- Click OK.
- Add each of your Web modules.
- Right-click Web Modules and select Import.
- Navigate to your converted Web module and click Open.
- Fill in a Context root and click OK.
- Identify any other application properties. Click Help for a description of the settings.
- Save the EAR file.
Installing the Application on WebSphere Application Server
Procedure
- Create a JDBC provider and a data source object following the instructions in Creating a JDBC provider and data source.
- Install the application, following the instructions in Installing a new application and bind the resource references to the data source that you created.