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, 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 the EJB modules to the 2.1 specification before installing them onto WebSphere Application Server.
(zos) Applications left 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.
- 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 the WAS 4.0 EAR file and click Select.
- In the Add Files window, navigate to the 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 we 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 the WebSphere 4.0 EAR file and click Select.
- In the Add Files window, navigate to the WAR file and expand the WEB-INF and lib directories.
- Select each JAR file and click Add.
- After we 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 the WAS 4.0 EAR file and click Select.
- In the Add Files window, navigate to the WAR file.
- Select each of the directories and files in the WAR file, excluding META-INF and WEB-INF, and click Add.
- After we add all of the required resource files, clickOK.
- Import the web components.
- Right-click Web Components and select Import.
- In the Import Components window click Browse.
- Navigate to the WAS 4.0 EAR file and click Open.
- In the Import Components window, highlight the WAR file that you are migrating.
- Highlight each of the components and click Add.
- When all of the 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 the new web module.
- Add servlet mappings for each of the 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 the WAS 4.0 EAR file and click Select.
- In the Add Files window, navigate to the enterprise bean JAR file.
- Select each of the directories and class files and click Add.
- After we add 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 the EJB modules.
- Right-click EJB Modules and select Import.
- Navigate to the converted EJB module and click Open.
- Click OK.
- Add each of the web modules.
- Right-click Web Modules and select Import.
- Navigate to the 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 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, JSP, or enterprise session beans
If we plan to upgrade to WAS v6.1 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 concepts
Development and assembly tools
Related tasks
Install enterprise application files with the console Configure a JDBC provider and data source Create or changing a resource reference Migrate enterprise bean code to the supported specification