Adding a column for collision detection when generating a top-down mapping

This task describes how to add a column for collision detection when generating a top-down mapping.

Prerequisite tasks

  1. Enable the J2EE and Database Capabilities. You can complete this as follows:

    1. In the workbench preferences page (Windows > Preferences) expand the folder Workbench , select Capabilites.

    2. Under the Capabilities list, select the check boxes: J2EE Developer. Click OK.

  2. Create a version 1.3 or 1.4 enterprise application project with a target server of WebSphere Application Server v6.0.

  3. Create a version 2.x EJB project in the enterprise application project you just created.

  4. Create or import a 2.x CMP beans in the EJB project that correspond to the enterprise application project you just created.

  5. Set up the optimistic access intent to wsOptimisticUpdate or wsOptimisticRead.

Steps for this task

To generate a collision detection column for top-down EJB 2.x CMP entity bean, complete the following:

  1. Refer to the generating a top-down mapping task.

  2. In the EJB to RDB Mapping wizard, select the optional check box Add a column for collision detection.

Post task

Before using the collision detection column, complete the following:

  1. Create your own database trigger to support the use of the collision detection column.
Results

Adding a column for collision detection results in the following events:


Picture of the <a href=Mapping editor after adding a column for collision detection." />

 

Parent topic

Adding a column for collision detection

 

Related concepts

Generating a top-down mapping