The bottom line is that double-checked locking, in whatever form, should not be used because you cannot guarantee that it will work on any JVM implementation.
无论以何种形式,都不应使用双重检查锁定,因为您不能保证它在任何 JVM 实现上都能顺利运行。
2
Pessimistic session locking is a form of serialization and can severely limit system availability, and so should be used with caution.
悲观会话锁定是一种序列化形式,会严重地影响系统的可用性,须小心使用。
3
It prevents a common form of deadlock that occurs when multiple sessions are reading, locking, and potentially updating resources later.