Enabling optimistic locking
You can enable an optimistic concurrency control scheme
for CMP entity 1.x beans.
About this task
The objective of optimistic concurrency is to minimize the time over which a given resource would be unavailable for use by other transactions. This is especially important with long-running transactions, which under a pessimistic scheme would lock up a resource for unacceptably long periods of time.
Under an optimistic scheme, locks are obtained immediately before a read operation and released immediately afterward. Update locks are obtained immediately before an update operation and held until the end of the transaction.
Procedure
- Switch to the Java™ EE perspective.
- In the Enterprise Explorer view, right-click the deployment descriptor, and select .
- On the Bean page of the editor, scroll to the Concurrency Control section.
- Select the Enable optimistic locking check box.
What to do next
For more information about optimistic locking and concurrency control, see the WebSphere® Application Server documentation.