Versioning and optimistic locking is also immune to the inevitable race 
condition of checking for changes before a commit.  It does throw an exception 
though, which makes recovery like offering a "merge" screen somewhat 
complicated.

Sometimes you still might want to peek outside the current transaction, like if 
you wanted to poll for changes during an edit session and show a warning.  A 
query in a different entitymanager (like one you get from @PersistenceContext 
or from JNDI) ought to do the trick, no?


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026381
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to