[jboss-user] [JBossCache] - newbie question - ReplicationException

slattery do-not-reply at jboss.com
Thu Jul 26 11:12:08 EDT 2007


I constructed a test where two JVMs join the same PojoCache cluster.

Each JVM starts one transaction. Here are the two timelines matched up:


  |  JVM-1                    JVM-2
  |                            
  |  --Begin Tx1---
  |  Modify cachedObj1
  |                           --Begin Tx2---
  |     (sleeps...)           Modify cachedObj1
  |                           --Commit Tx2---
  |  Modify cachedObj1           
  |  --Commit Tx1---
  | 

Basically, two overlapping transactions try to modify the same cached object.

I was surprised to find that both transactions fail during commit()--both throwing a ReplicationException() with a nested lock.TimeoutException().

Am I doing something wrong? Shouldn't at least one transaction succeed, and then the other can try again?  Otherwise, it seems like if they both have to try again, and forever collide.

Thanks in advance for your feedback.

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

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



More information about the jboss-user mailing list