Skip Headers

# Configuring a Pessimistic Locking Policy

Previous

Next

You can configure a descriptor with a `PessimisticLockingPolicy` only when using a `CMPPolicy`. That is, you only can configure a `PessimisticLockingPolicy` for descriptors that support EJB information (see "Configuring a Descriptor With EJB Information") in a CMP project.

Instantiate a `CMPPolicy` and use `CMPPolicy` method `setPessimisticLockingPolicy` to set an instance of `PessimisticLockingPolicy`. Then use the `ClassDescriptor` method `setCMPPolicy` to set the `CMPPolicy`.