Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
hibernate (v3.6) 锁定模式 UPGRADE_NOWAIT 和 UPGRADE 有什么区别?
在什么情况下我们会使用这些锁定模式?
基本区别在于锁的获取(wait or nowait)
UPGRADE已弃用。尝试使用 Oracle 样式获取升级锁select for update。
UPGRADE
select for update
UPGRADE_NOWAIT- 尝试使用 Oracle 样式获取升级锁select for update **nowait**。这种锁定模式的语义,once obtained, are the same as UPGRADE.
UPGRADE_NOWAIT
select for update **nowait**
once obtained, are the same as UPGRADE