Migration Lab - Part II
WBOnline (J2EE 1.2) with WebSphere Test Environment for WAS 5.0

OBJECTIVES

This workshop will show you the process of migrating an application from WebSphere Studio Application Developer 4.0 to 5.0. The WBOnline Banking Application will be used to demonstrate the migration process. This workshop is divided into three parts:

Please complete Part I of this workshop before proceeding. In Part II, we will run the J2EE 1.2 WBOnline Application that we imported in Part I in the WAS 5.0 Unit Test Environment.

Note:  This workshop requires that the following products are installed:
  • WebSphere Studio Application Developer 5.0
  • DB2 UDB 7.2 FP7

Section 1 - Running WBOnline in WAS 5.0 Unit Test Environment

We will setup the WAS 5.0 Unit Test Environment first and then run the WBOnline Application.

___ 1. Create a new Server and Server Configuration

a. If not already started, start WebSphere Studio Application Developer and switch to a Server perspective.

b. Choose File->New->Server and Server Configuration from the menu bar.

c. From the Create a new server and server configuration wizard, specify the following:

Parameter Value
Server name WebSphere v5 Unit Test
Folder Servers
Server type WebSphere version 5.0->Test Environment (Beta)
Template None
WebSphere configuration template None

Click the Next> button.

d. Verify a HTTP port number of 9080.

Click the Finish button.

This will create a new server and server configuration.

___ 2. Add the jdbc/AIS DataSource to the WebSphere 5.0 server configuration
a. From the Server Configuration view, expand Server Configurations and select WebSphere v5 Unit Test.  ( Note: By default, this is in the lower left hand corner of the workbench)

 
b. Click mouse button 2, and choose Open from the pop-up menu.  This will launch the server configuration editor in the source view.

c. From the WebSphere v5 Unit Test configuration editor, click on the Data source tab.

d. From the JDBC provider list in the Node Settings Section, click the Add... button. (Note: You can add the datasource to the Node or the Server, it won't matter in our case here.)

e. From the Create a JDBC Provider dialog, specify the following and then click Next>:

Parameter Value
Database type IBM DB2
JDBC provider type DB2 JDBC Provider

f. From the Create a JDBC Provider dialog, specify the following:

Parameter Value
Name DB2JDBCProvider
Description DB2 JDBC Provider
Implementation class name COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource

 

and then click the Finish button. 

f. With the DB2JDBCProvider selected, click the Add... button to the right of the Data source defined in the JDBC provider selected above.

g. From the Create a Data Source dialog, choose WebSphere v4.0 data source and click Next>. (Note : In order to run WBOnline as a J2EE 1.2 Application, we need to create WebSphere v4.0 data source.)

h. From the Modify Data Source dialog, specify the following:

Parameter Value
Name AIS
JNDI name jdbc/AIS
Description AIS Datasource
Database name AIS

Click the Finish button.

The Data sources should look similar to this:

h. Hit Ctrl+S to save the changes.

i. Close the WebSphere v5 Unit Test configuration editor.

___ 3. Start the Unit Test Server
a. From the Server Configuration view, select the WebSphere v5 Unit test configuration, click mouse button 2, and choose Add->WBOnlineEAR from the pop-up menu.

b. From the Servers view highlight the WebSphere v5 Unit Test server, click mouse button 2, and choose Start from the pop-up menu.

This will publish the project and start the server.  After a few moments, check the console window.  You should see a message saying the Default Server open for e-business.  You should scroll through the console to verify the EJB jar WBOnline was started.

___ 4. Test WBOnline

a. From the Navigator view, select the WBOnline project, click mouse button 2, and choose Propertes from the pop-up menu.

b. From the Properties dialog, select Server Preference from the left-hand pane.  Select WebSphere v5 Unit Test from the right-hand pane.  Click the OK button.

c.  From the Navigator view, expand the WBOnline and Web Content folders. Highlight Index.html and click mouse button 2 :

Choose Run on Server from the pop-up menu.


The internal browser should be loaded up with the Index.html page.

d. From the Index.html page, click on the Online Account Activity link.

e. Enter "1" for the WEBBank Customer Number entry field and press Submit.

f. It should show a list of accounts for customer #1.



Click on one of the account numbers. You should see a list of transactions for that particular account.

___ 5. Stop the Server
a. Close the Web Browser.

b. Switch from the Console view to the Servers view.

c. Highlight the WebSphere v5 Unit Test Server, click mouse button 2, and choose Stop from the pop-up menu.

Congratulations, you've completed Part II of the migration workshop! Part III of the workshop will focus on transforming WBOnline into a J2EE 1.3 Application.