Hello,
First, thanks for putting this great project out.

I have a question regarding transaction behavior when creating new nodes. I'm 
trying to figure out how to atomically create a node and update it within a 
single transaction.  Using a REPEATABLE_READ transaction level, the assertion 
on line 8 below fails if node "/a/b" does not exist - is this expected?  

The behavior I was expecting is that one of the transactions would throw an 
exception on commit, such that only one transaction modified the node.  If node 
"/a/b/" exists at the start, then thread 2 will get an exception trying to 
upgrade the read lock on line 6.


  |      T1                                         T2
  | 1  tx1.begin()
  | 2                                              tx2.begin()
  | 3  get("/a/b", "foo")                          get("/a/b", "foo")
  | 4  put("/a/b", "foo", "bar")
  | 5  tx1.commit()
  | 6                                              put("/a/b", "foo", "qux")
  | 7                                              tx2.commit()
  | 
  | 8 assertEquals("bar", get("/a/b", "foo"))
  | 

Thanks,
--
dave

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

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


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to