Migrating WAS 5.x projects to WAS 6.0 in RAD

There are all kinds of considerations when migrating an application from WAS 5.x to 6.x. But I want to talk about moving projects from WAS 5.x to WAS 6.x within Rational Application Developer. This change could come in two flavors:
  1. Moving from WSAD to RAD
  2. Moving from RAD using WAS 5.1 to WAS 6.0
Before we talk about specific steps to follow, it must be noted that every J2EE project in WSAD or RAD uses at least 2 variables. Both of these variables are predefined in the IDE and point to specific set of jar files:
  1. JRE System Library variable, which can be configured to point to any valid JRE. While you have the option to use the eclipse JRE that comes with the IDE, I recommend against it. The JRE System Library variable should point to WebSphere JRE because the code is ultimately going to run in WAS runtime environment.
  2. WebSphere v5.1 runtime, which is added by WSAD or RAD when the project was created for WAS 5.x server. This variable includes all the J2EE and WebSphere libraries needed to build the project 
In any case you can follow these steps to move the project: 

  1. If the project doesxxn't exist in RAD already, import it using File > Import > Existing Project into Workspace, select the directory that contains the .project file and click Finish
  2. Upon successful import, one or more of the following could happen:
  • If you are using RAD and if you have installed WAS 5.x test environment, you should not get any errors. To use WAS 6.x runtime in this case,
  1. Right click the project, select Properties > Java Build Path > Libraries tab
  2. Select JRE System Library variable and click Edit button
  3. Click Alternate JRE radio button, select WebSphere v6 JRE from the dropdown and click Finish
  4. Go to the Server section in the Properties dialog box and select WebSphere Application Server v6.0 in the Target runtime dropdown
  5. Click OK to close the Properties dialog box, the project should rebuild itself
  • If you haven't installed WAS 5.x test environment, you will get errors upon importing a project that has WAS 5.x entries in its classpath. In that case,
  1. Right click the project, select Properties > Java Build Path > Libraries tab
  2. If the JRE System Library variable has an error, remove it
  3. Click Add Library button, select JRE System Library click Next
  4. Click Alternate JRE radio button, select WebSphere v6 JRE from the dropdown and click Finish
  5. Remove the WebSphere v5.1 runtime entry
  6. Go to the Server section in the Properties dialog box and select WebSphere Application Server v6.0 in the Target runtime dropdown
  7. Click OK to close the Properties dialog box, the project should rebuild itself
If any of your projects had generated EJB code, you will get a number of compilation errors that won't make much sense, just delete all the generated code and do a clean build. If you will start using JDK 1.4 with this move and have assert statements in your code, there are some other considerations
The Blind SideSherlock Holmes (2010)The Twilight Saga: New MoonThe Hurt LockerDid You Hear About the Morgans?

0 comments: