-
1. Re: How to add without overwriting
manik Feb 2, 2007 8:34 AM (in response to vincent.marquez)Transactions.
1) Start a tx
2) Check if node is empty
3) If so, write to node
4) End tx -
2. Re: How to add without overwriting
vincent.marquez Feb 5, 2007 2:53 PM (in response to vincent.marquez)Would it be appropriate to use the DummyTransactionManager here? I thought I had read somewhere that it wasn't recommended for production use... Thank you for your reply.
-
3. Re: How to add without overwriting
vincent.marquez Feb 5, 2007 7:48 PM (in response to vincent.marquez)Also, I wrote a simple test case, and got some unexpected behaviour.
I started a tx in the first vm, then checked if a node 'existed'. Then, from another VM, I added data to that node. Back in the original VM, I added data to a node and called commit.
I was expecting some sort of rollback exception, but instead it overwrote the value that the 2nd VM had placed in the node.
To me, this appreas incorrect. Any ideas on something i'm doing wrong? Thanks again for the help. -
4. Re: How to add without overwriting
manik Feb 9, 2007 5:23 AM (in response to vincent.marquez)1) Wouldn't recommend the dummy TM in production.
2) Did the 2nd node use a tx as well? If it didn't then there is no guarantee that it's data will be safe. If both nodes used txs, then the 2nd node would not have been able to commit (it would have rolled back)