what is Pessimestic Locking in Entity Bean How do we do this
Pessimistic locking in Entities generally means the record in the database is locked while interacting with the Entity, so no one else can alter the record. This increases safety but reduces performance.
The other option (Optimistic Locking) means that the record in the database is not locked. If the database record is changed while someone else is interacting with the entity, the operation will fail. This increase performance, at the cost of more failures, but can improve performance in systems where read operations are more frequent than updates.
Not all EJB servers support these locking strategies. If they do, they can be controlled through server-specific configuration.