Home  > Resources  > Blog

Migrating Projects to WID 6.2 to 7.0

 
January 14, 2011 by Bibhas Bhattacharya
Categories: SOA & Web Services , WebSphere

This morning, I started working on the WebSphere ESB v7.0 programming course – WA1916 WebSphere Enterprise Service Bus (ESB) v7.0 Programming Using WebSphere Integration Developer. I had to migrate a few projects from WID 6.2 to get started. I thought I will share a few interesting observations.

WID has  built in workspace migration wizard. When you bring in an old project – either through the import operation or CVS checkout – it will open the wizard automatically. In my case, I chose File > Import and then Other > Project Interchange.

I recommend migrating projects in two separate batches. First migrate the J2EE projects – that contain web services and web clients. Then migrate the business integration (SCA) modules. That will just simplify things.

Migrating J2EE Projects from WID 6.2

In WID 6.2, the J2EE projects were on a half way journey towards Java EE 5. They were J2EE 1.4 projects with some aspects of Java EE 5 thrown in – such as JAX-WS and JPA. That was done through WebSphere feature packs. Now, in WID 7, we have true Java EE 5 projects. So, what that means is, migration will involve two steps:

  1. Migrate the project structure from WID 6.2 to 7.0. This will be done by the workspace migration wizard that is started automatically when you bring the old project into WID 7 workspace.
  2. Migrate the specification level from J2EE 1.4 to Java EE 5. This will be done by a separate migration wizard.

So, let’s get started. Import the old J2EE projects (Enterprise application, web and EJB projects) into the workspace. The workspace migration wizard will start automatically after the files have been copied into the workspace. You can pretty much click Next in every screen. In the server runtime page, you will need to select a V7 server.

image

In my case, I selected WebSphere ESB Server v7.0. You can also select process server, if that is your runtime.

After the migration wizard finishes, if you have a JAX-WS web service in a web or EJB module, you will see an error message.

image

WebSphere Application Server v7.0 is not going to scan this module for JAX-WS annotations. You can enable scanning by setting the UseWSFEP61ScanPolicy property to true in the MANIFEST.MF file.

I must say, I was stumped by this. Fortunately, I could Google "UseWSFEP61ScanPolicy" which lead me to this InfoCenter page. Log story short – I had to migrate the projects from J2EE 1.4 to Java EE 5. Honestly, I did not originally consider that step, until I saw the InfoCenter page. So, in a way I am glad I saw that error message. In the next section, we will deal with Java EE migration.

Migrate Specification Level

Right click the enterprise application project and select Java EE > Specification Migration Wizard. Once again, you can pretty much click Next in every page and complete the wizard.

But alas, the error message remained. No amount of cleaning, rebuilding and re-validating got rid of it. Fortunately, I found an easy solution. Just export the projects as project interchange and then import them back in. That will get rid of the error.

Migrate SCA Modules

Import the SCA modules into the workspace. The workspace migration wizard will open. Change the server runtime to V7.0. And you are done!

image

Follow Us

Blog Categories