[jboss-user] [EJB 3.0] - Re: EntityManager.lock() issues

mteira do-not-reply at jboss.com
Tue Aug 22 03:37:08 EDT 2006


Thanks for the answer and excuses for the delay into replaying again.

So, when is the transaction supposed to be commited? On exiting the MDB onMessage() embedding the entity creation?

What I want to get using the EntityManager.lock() method is to avoid other MDBs handling the INCR messages to modify concurrently the entities. Also, I want the modifications made by any of the MDB to be seen by the other ones.  Something similar to the behaviour we got using 'SELECT FOR UPDATE' SQL clauses. Isn't that what EntityManager.lock() is used for?

Any other suggestion to get this pattern working on EJB3? I want a pool of MDBs handling requests for activity. These requests, when targetting the same entity, must get exclusive access to that entity.

Regards.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966607#3966607

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



More information about the jboss-user mailing list