Migrating J2EE projects

Use the J2EE Migration wizard to migrate the project structures and J2EE specification level of enterprise application projects and associated modules.

Project structure migration

For projects that were created in earlier version of the workbench, the project structures may be different. You can use the J2EE Migration wizard to migrate the old project structures to the current project structures.

J2EE specification level migration

The J2EE Migration wizard also helps you to migrate the J2EE specification level of enterprise application projects and other module projects. For example, you can migrate a project from J2EE 1.2 to J2EE 1.3 or J2EE 1.4.

The migration of the project structure and the migration of the J2EE specification level can be performed at the same time, or separately, with the wizard.

If you choose to migrate the J2EE specification level, specify the target server for the projects.

Target server migration

If you choose to migrate the J2EE specification level, during the migration you can also specify the target server.

EJB migration

For EJB modules that you are migrating you have extra options that the migration wizard can perform:

  • Migrate CMP 1.x beans to CMP 2.x beans: If you have EJB 1.x CMP beans as part of your EJB module, you can choose to migrate them to the EJB 2.x specification level. Because not everything can be successfuly migrated, you may have validation errors after migrating. For example, finder queries are migrated to EJB QL, but the finder statement will be invalid because it cannot be determined from the given meta-data.

  • Add local client views: If you are migrating EJB 1.x CMP beans in your EJB module to EJB 2.x CMP beans, this option adds a local client view to the CMP beans.

Tip: If you import a legacy enterprise application project EAR file, the project structures are automatically updated from previous versions.

To migrate an enterprise application project and its modules:

  1. In the Project Explorer view of the J2EE perspective, right-click the enterprise application project that you want to migrate, and select Migrate > J2EE Migration Wizard from the pop-up menu. The J2EE Migration wizard opens.

  2. Click Next to step through the wizard. The wizard includes a page for each type of module that is being migrated. Each page includes a table where you select the specific projects that you want to migrate.

  3. Optional: If you are migrating the EJB specification level of CMP entity beans, and if you are adding local client views to the beans, you can use the EJB Module Migration page to further define the migration of the beans. You can select the enterprise beans that will be migrated and have local client views added, and you can define the local client view naming scheme. You can also specify whether you want to delete the remote view.

  4. Click Finish to begin the migration.

    After the migration is complete, the wizard displays a report that lists the results of the migration.

    Note: You should pay particular attention to this report because it indicate which artifacts were migrated, replaced, or deleted because they were no longer valid.

 

Related concepts

J2EE architecture