Hi,

I think this is a very simple issue but I am getting confused.

I have a form in a web application which displays data and the user 
edits them. I use optimistic locking using the version lock strategy
which seems to work fine as the version_lock column increments
after each commit.

I have a stateless session bean with a method that retrieves the value object 
(CMP Entity Bean) and populates the form. 
Then another method in the session bean does the update after the user 
clicks save changes. Both methods and the entity bean
are marked as Required in the ejb-jar.xml

My problem is that these two methods are 2 different transactions so
JBoss does not detect the update of the data when 2 users update the
form concurrently and no exception from the optimistic locking mechanism is 
thrown.

The only way I can think is with client-initiated transaction which 
begins before the retrieval of the data and commits after the user clicks
save.

Is there a better way to implement this using XML declarations?
I just need to include the user input (thinking time) inside the transaction.

Thanks

Petros


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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to