The main problem with a pessimistic approach is that transactions have to wait for each other.
悲观锁定方法最主要的问题是,事务之间必须互相等候。
If the application access pattern is predominately update access, then pessimistic approach might be advantageous in that it avoids optimistic concurrency update failures.
如果应用程序访问模式主要是更新数据,那么乐观锁定方法能有利地避免乐观并发性更新的失败。
As described previously, the intent of the pessimistic approach is to ensure that the data loaded into the entity bean is locked during the entire duration of a transaction.
正如先前描述的一样,悲观方法的意图是确保装入实体bean的数据在整个事务处理持续时间内处于锁定状态。
应用推荐