[jboss-user] [JBossCache] - Re: Optimistic DataVersioningException on read-only objects

manik.surtani@jboss.com do-not-reply at jboss.com
Thu Feb 22 11:58:38 EST 2007


This is expected behaviour.  If you have concurrent threads changing the same node at the same time, one of the threads will fail.  

In pessimistic locking, the 2 threads are NOT ALLOWED to change nodes at the same time and one thread waits.  This leads to poor concurrency.  Optimistic locking allows both threads to access nodes at the same time and hopes that one thread will just read and not write.  If simultaneous writes happen, you will naturally get a concurrent modification exception.

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

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



More information about the jboss-user mailing list