This content has been marked as final.
Show 5 replies
-
1. Re: Transactions problem
manik Nov 29, 2006 9:30 AM (in response to qwier)If they run simultaneously, both transactions won't succeed. One of them will fail since there will be a race condition to commit at the same time, and both transactions will have locks on the node in question.
If you removed your sleep time, chances of success are higher, but there will still be that race condition. This is expected since cluster-wide locks are not obtained when you read your node using a cache.get(). -
2. Re: Transactions problem
qwier Nov 29, 2006 10:40 AM (in response to qwier)"manik.surtani@jboss.com" wrote:
If you removed your sleep time, chances of success are higher, but there will still be that race condition. This is expected since cluster-wide locks are not obtained when you read your node using a cache.get().
Thanks!
But how can I obtain cluster-wide locks when modifying data inside the cache? -
3. Re: Transactions problem
manik Nov 29, 2006 10:56 AM (in response to qwier)You can't. We don't do cluster-wide locks. :-) Remote locks are obtained on transaction commit time.
-
4. Re: Transactions problem
qwier Nov 29, 2006 11:25 AM (in response to qwier)"manik.surtani@jboss.com" wrote:
You can't. We don't do cluster-wide locks. :-) Remote locks are obtained on transaction commit time.
OK., Lets assume a situation where N services on N different JBoss instances are reading and modifying data, how data integrity can be achieved? Only by catching failed transactions and re-running them again? -
5. Re: Transactions problem
manik Dec 14, 2006 12:30 PM (in response to qwier)Yes.
You would want SYNC_REPL though.