Migrate applications to use data sources of the current Java EE Connector Architecture (JCA)
Migrate the applications that use Version 4 data sources, or data sources (WebSphere Application Server V4), to use data sources that support more advanced connection management features, such as connection sharing.
To use the connection management infrastructure in the application server, we must package the application as a Java EE 1.3 or later application. This process involves repackaging the web modules to the 2.3 specification and your EJB modules to the 2.1 specification before installing them onto WAS.
(ZOS) Applications remaining at the Java EE 1.2 level will continue to run fine using the connection management support that was available at V4.0; simply create the JDBC provider and data source, and install the 4.0 application as-is. If we choose to repackage the application for version 6.0 or above we can not use a Version 4.0 data source. We must use the other data source option, which supports applications coded to the Java EE 1.3 specifications, at minimum.
Tasks
- Convert a 2.2 web module to a 2.3 web module
- 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 our WAS 4.0 EAR file and click Select.
- In 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 adding 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 the WebSphere 4.0 EAR file and click Select.
- In 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 adding all of the required JAR files, click OK.
- 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 our WAS 4.0 EAR file and click Select.
- In 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 adding all of the required resource files, click OK.
- Import the web components.
- Right-click Web Components and select Import.
- In the Import Components window click Browse.
- Navigate to our WAS 4.0 EAR file and click Open.
- In the Import Components window, highlight the WAR file that we are migrating.
- Highlight each of the components and click Add.
- When all of our web components display in the Selected Components pane of the window, click OK.
- Verify that the web components are correctly imported under the Web Components section of our new web module.
- Add servlet mappings for each of our 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 other web module properties required. Click Help for a description of the settings.
- Save the web module.
- Convert a 1.1 EJB module to a 2.1 EJB module (or later)
- 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 our WAS 4.0 EAR file and click Select.
- In the Add Files window, navigate to your enterprise bean JAR file.
- Select each of the directories and class files and click Add.
- After adding all of the required class files, click OK
- Add any other EJB module properties 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
- Create a new Application by selecting File > New > Application.
- Add each of our EJB modules.
- Right-click EJB Modules and select Import.
- Navigate to your converted EJB module and click Open.
- Click OK.
- Add each of our 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.
- Install the application on the application server.
- Install the application following the instructions in the topic on installing a new application, and bind the resource references to the data source that we created.
- Perform the necessary administrative task of creating a JDBC provider and a data source object following the instructions in the topic on creating a JDBC provider and data source.
Subtopics
- Connection considerations when migrating servlets, JavaServer Pages, or enterprise session beans
If we plan to upgrade to WAS v7.0 or later, and migrate applications from version 1.2 of the J2EE specification to a later version, such as 1.4 or Java EE, be aware that the product allocates shareable and unshareable connections differently for post-version 1.2 application components. For some applications, that difference can result in performance degradation.
Related:
Development and assembly tools Install enterprise application files with the console Configure a JDBC provider and data source Create or change a resource reference Migrate enterprise bean code to the supported specification