WebSphere Commerce Developer

Migrating independent EJB projects

Custom EJB beans from WebSphere Commerce Version 5.6.1 or 6.0 must be exported as a EJB JAR file and imported as a EJB jar into the WebSphere Commerce Version 7.0 J2EE perspective > EJB Projects > WebSphereCommerceServerExtensionsData , project or into your own project. After exporting and importing, the EJB beans can be migrated.

About this task

An EJB module contains one or more beans. An EJB level is associated with both an EJB module and with each bean within the module. WebSphere Commerce Version 5.6.1 contain level 1.1 beans within level 1.1 modules. In WebSphere Commerce Version 6.0, all modules are at a 2. x level but the beans, within the module, may be at either a 1.1 or 2. x level. When migrating to WebSphere Commerce Version 7.0, ensure you migrate the independent EJB modules to the 2. x level. You do not need to migrate the beans; they can stay at the 1.1 level.

Procedure

  1. To export the EJB projects:
    1. Open your WebSphere Commerce Version 5.6.1 or 6.0 development environment workspace and open the J2EE perspective.
    2. Right-click the EJB module you want to export.
    3. Select Export > Export EJB JAR file from the pop up menu. The Export wizard opens.
    4. In the Destination field, enter the full path and JAR file name where you want to export the EJB module.
    5. Optional: To export source files, select the Export source files check box.
    6. Optional: If you are exporting to an existing JAR file and you do not want to be warned about overwriting it, select Overwrite existing files without warning.
    7. Click Finish .
  2. To import the EJB JAR files:
    1. Open WebSphere Commerce Developer Version 7.0 and open the J2EE perspective.
    2. In the J2EE perspective, click File > Import > EJB JAR and click Next .
    3. In the EJB JAR file combination box, enter the location and name of the EJB JAR file that you want to import. You can click the Browse button to select the JAR file from the file system.
    4. In the EJB project combination box, type a new project name. If a new EJB project is created, it is created with the same version as the EJB JAR being imported. If you select an EJB 2.x project and import an EJB 1.1 EJB JAR file, the version of the CMP beans is set to 1.x.
      Note: If you want to use a an existing project name, you need to delete the existing project using that name, then import the project with the intended project name.
    5. If you are importing to a new project, ensure Add module to an EAR project is selected, and select WC from the EAR project drop-down list.
    6. Click Finish to import the EJB JAR file.
    7. Refresh the EJB project.
    8. Update the class path for each custom project to resolve the dependencies on libraries and between projects.
    9. For IBM i OS operating systemIf your EJB-RDB mapping is for an IBM database schema less than V5R2, recreate the mapping: right-click the EJB project and select Java EE > EJB to RDB mapping > Generate map.
  3. Version 5.6 To migrate the EJB beans:
    1. Open WebSphere Commerce Developer Version 7.0 and open the Rational Application Developer project migration wizard.
    2. Right-click on the EJB project.
    3. Select Java EE > Specifications Migration Wizard . The Specifications Migration Wizard Welcome Page displays.
    4. Click Next . The EJB Module Migration page displays. Accept the defaults on the EJB Module Migration page.
      Note: The defaults should be set to Migrate project structure and to Migrate project J2EE specification level to version 1.4. Do not specify "Migrate CMP 1.x beans to CMP 2.x beans" or "Add local client views".
    5. Click Finish.
  4. Update the DataSource value.
  5. Perform optimistic locking.
    1. Migrating EJB projects to use optimistic locking
    2. Validating that CMP entity beans can use optimistic locking