[jboss-user] [EJB/JBoss] - ejbFindByPrimaryKey, locking, and consistency

dkMazz do-not-reply at jboss.com
Wed Jul 26 15:35:11 EDT 2006


I have an inventory system that uses session facade on the backend.  The front end is a page that shows inventory items and the user can select one of the items and be taken to a details page.  

My question is:
When the user is on the details page, will the JBoss session facade block another user from accessing the details page for the same item?  Or do I need to code to prevent this myself?  My thinking is that internally, an entity bean exists in memory for the DB rowid of the item being viewed. Then when another user tries to do ejbFindByPrimaryKey for the same item ID, the ejb container should return an error because someone else is already using it, right?  Or is the JBoss EJB container smart enough to allow two people to both view and potentially modify the same data while enforcing consistency?

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

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



More information about the jboss-user mailing list