-
1. Re: TreeCacheAOP transacctional add, remove for Collection
ben.wang Apr 7, 2004 8:31 AM (in response to arojo)Hi,
This seems to be a bug in the replication locking protocol. I'd expect that if you do a concurrent transaction on both instances, the one that does commit first will time out and rollback. Then the second one to commit should succeed (in this case, Thread 1, "German").
And this should have nothing to do with the aop part, i.e., TreeCache only.
I will let you know when I have a fix.
Thanks,
-Ben -
2. Re: TreeCacheAOP transacctional add, remove for Collection
arojo May 18, 2004 4:19 AM (in response to arojo)Hello,
First congratulations for a great work. I've look at the code to see if I can help to fix this. As I see it the Transaction system detects the conflict and changes both transaction status to
Status.STATUS_ROLLEDBACK;
at DummyTransaction.commit() but it doesnt communicate the exception. Should the transaction state be checked after the commit to force the rollback?. Maybe a rollback exception could be thrown at the commit method.public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { status=Status.STATUS_COMMITTING; try { notifyBeforeCompletion(); status=Status.STATUS_COMMITTED; notifyAfterCompletion(status); } catch(Throwable t) { status=Status.STATUS_ROLLEDBACK; /*********************** NEW CODE **************/ throw new RollbackException(t.getMessage()); /****************************************************/ } // Disassociate tx from thread. tm_.setTransaction(null); }
Thanks
Alvaro -
3. Re: TreeCacheAOP transacctional add, remove for Collection
belaban May 18, 2004 7:29 AM (in response to arojo)done, checked into CVS head.
Thanks,
Bela