Migrate your 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.
About this task
To use the connection management infrastructure in the application
server, you must package your application as a Java EE 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.
Procedure
- 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 WebSphere Application Server 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 WebSphere Application Server 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 WebSphere Application Server 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 other web module properties that are 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 WebSphere Application Server 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 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
- 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.
- 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 you 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.