Setting the optimistic locking option of the bean

If your bean will use optimistic locking, set the optimistic locking option in the deployment descriptor.

Before you begin

You have set the security role of the bean

Procedure

  1. In the Deployment Descriptor editor, select the Bean tab.
  2. Select your bean and select Enable optimistic locking in the Concurrency Control section.
  3. Save your work and then close the Deployment Descriptor editor.
  4. Proceed to modifying the entity context fields and methods.