WAS v8.5 > Migrate, coexist, and interoperate > Migrating Data access resources > Migrating data sourcesMigrating 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, you 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 custom EJB modules to the 2.1 specification before installing them onto WAS.
- 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 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 the 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 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 your 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 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
- 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 custom EJB modules.
- Right-click EJB Modules and select Import.
- Navigate to your converted EJB module and click Open.
- Click OK.
- Add each of the 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 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 you plan to upgrade to WAS v6.x, and migrate applications from version 1.2 of the J2EE specification to a later version, such as 1.4 or Java EE, be aware 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.- Connection considerations when migrating servlets, JSP, or enterprise session beans
If you plan to upgrade to WAS v6.x, and migrate applications from version 1.2 of the J2EE specification to a later version, such as 1.4 or Java EE, be aware 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
Install enterprise application files with the console
Configure a JDBC provider and data source
Create or changing a resource reference
Migrating enterprise bean code to the supported specification