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 , 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
- To export the EJB projects:
- Open your WebSphere Commerce Version 5.6.1 or 6.0 development
environment workspace and open the J2EE perspective.
- Right-click the EJB module you want to export.
- Select from the
pop up menu. The Export wizard opens.
- In the Destination field, enter the full path and JAR
file name where you want to export the EJB module.
- Optional: To export source files, select
the Export source files check box.
- 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.
- Click Finish .
- To import the EJB JAR files:
- Open WebSphere Commerce Developer Version 7.0 and open
the J2EE perspective.
- In the J2EE perspective, click and click Next .
- 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.
- 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.
- 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.
- Click Finish to import the
EJB JAR file.
- Refresh the EJB project.
- Update the class path for each custom project to resolve
the dependencies on libraries and between projects.
- If your EJB-RDB mapping is for an IBM
database schema less than V5R2, recreate the mapping: right-click
the EJB project and select .
- To migrate the EJB beans:
- Open WebSphere Commerce Developer Version 7.0 and open
the Rational Application Developer project migration wizard.
- Right-click on the EJB project.
- Select .
The Specifications Migration Wizard Welcome Page displays.
- 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".
- Click Finish.
- Update the DataSource
value.
- Perform optimistic locking.
- Migrating
EJB projects to use optimistic locking
- Validating
that CMP entity beans can use optimistic locking