You made me believe an actual advise was posted, anyway:
As reference says, the lock is honored at persistence-context level. Since two sessions
are involved, there exists two different persistence-contexts, so EntityManager.lock()
issued in one session has not enough 'reachability'.
Besides, the lock (either READ or WRITE) granted by EntityManager.lock() is not
semantically equivalent to pessimistic lock. In other words no thread is getting blocked
when accessing an already locked entity.
That is why I'm looking for expert advise.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144748#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...