Modifying the entity context fields and methods

The next step is to remove some of the fields and methods related to entity context that Rational Application Developer generates. WebSphere Commerce provides its own definition of these fields and methods, in the ECEntityBean base class, which your new bean should use.

Before you begin

You have set the optimistic locking option of the bean.

Procedure

  1. In the J2EE Hierarchy view, expand the WebSphereCommerceServerExtensionsData project.
  2. Expand Entity Beans, the yourNewBean bean, and then double-click the yourNewBeanBean class.
  3. In the Outline view:
    1. Right-click the myEntityCtx field and select Delete.
    2. Right-click the getEntityContext() method and select Delete.
    3. Right-click the setEntityContext(EntityContext) method and select Delete.
    4. Right-click the unsetEntityContext() method and select Delete.
  4. Save your work.
  5. Proceed to modifying the ejbLoad and ejbStore methods.