[jboss-user] [EJB 3.0] - Re: concurrently modifying entity instance

gsegura do-not-reply at jboss.com
Thu Apr 17 03:55:00 EDT 2008

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#4144748

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144748

More information about the jboss-user mailing list