Migrating independent EJB projects

Custom EJB beans from WebSphere Commerce Version 7.0 must be exported as an EJB JAR file and imported as an EJB JAR into the WebSphere Commerce Version 8.0 J2EE perspective > EJB Projects > WebSphereCommerceServerExtensionsData project or into your own project. After you export and import, 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. All WebSphere Commerce Version 8.0 modules are at a 2.x level. When you migrate to WebSphere Commerce Version 8.0, migrate the independent EJB modules to the 2.x level.

Procedure

  1. To export the EJB projects:
    1. Open your WebSphere Commerce Version 7.0 development environment workspace and open the J2EE perspective.
    2. Right-click the EJB module that you want to export.
    3. Select Export > Export EJB JAR file from the 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.
    7. Click Finish.
  2. To import the EJB JAR files:
    1. Open WebSphere Commerce Developer Version 8.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 an existing project name, you need to delete the existing project by 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 system If your EJB-RDB mapping is for an IBM database schema less than V5R2, re-create the mapping: right-click the EJB project and select Java EE > EJB to RDB mapping > Generate map.
  3. Update the DataSource value.