[Mulgara-svn] r428 - branches/mgr-70/src/jar/resolver/java/org/mulgara/resolver
andrae at mulgara.org
andrae at mulgara.org
Wed Sep 12 05:12:20 UTC 2007
Author: andrae
Date: 2007-09-12 00:12:20 -0500 (Wed, 12 Sep 2007)
New Revision: 428
Modified:
branches/mgr-70/src/jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java
Log:
When executing a transactional operation after dropping the mutex, if an
exception was thrown we didn't re-obtain the mutex - this is a bad thing to do
when you are relying on the mutex to protect the transaction state.
Modified: branches/mgr-70/src/jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java
===================================================================
--- branches/mgr-70/src/jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java 2007-09-12 04:39:45 UTC (rev 427)
+++ branches/mgr-70/src/jar/resolver/java/org/mulgara/resolver/MulgaraTransactionManager.java 2007-09-12 05:12:20 UTC (rev 428)
@@ -592,11 +592,12 @@
for (int i = 0; i < holdCount; i++) {
mutex.unlock();
}
-
- proc.execute();
-
- for (int i = 0; i < holdCount; i++) {
- mutex.lock();
+ try {
+ proc.execute();
+ } finally {
+ for (int i = 0; i < holdCount; i++) {
+ mutex.lock();
+ }
}
}
}
More information about the Mulgara-svn
mailing list