[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader/deadlock ...
Manik Surtani
manik at jboss.org
Tue Mar 6 13:00:36 EST 2007
User: msurtani
Date: 07/03/06 13:00:36
Modified: tests/functional/org/jboss/cache/loader/deadlock
ConcurrentCreationDeadlockTest.java
Log:
Rollback txs on fail
Revision Changes Path
1.15 +16 -3 JBossCache/tests/functional/org/jboss/cache/loader/deadlock/ConcurrentCreationDeadlockTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConcurrentCreationDeadlockTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/loader/deadlock/ConcurrentCreationDeadlockTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ConcurrentCreationDeadlockTest.java 7 Feb 2007 22:06:57 -0000 1.14
+++ ConcurrentCreationDeadlockTest.java 6 Mar 2007 18:00:36 -0000 1.15
@@ -8,7 +8,6 @@
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheFactory;
-import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.AbstractCacheLoaderTestBase;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -395,8 +394,8 @@
* A worker thread that applies the concurrent modifications.
*
* @author Marian Nikolov
- * @author $Author: genman $
- * @version $Date: 2007/02/07 22:06:57 $
+ * @author $Author: msurtani $
+ * @version $Date: 2007/03/06 18:00:36 $
*/
private class Worker extends Thread
{
@@ -462,6 +461,13 @@
tx.begin();
if (checkAndSetState())
{
+ try
+ {
+ tx.rollback();
+ }
+ catch (Exception e)
+ {
+ }
return;
}
// the first worker would create a new node for the FQN
@@ -472,6 +478,13 @@
cache.put(fqn, new Integer(m), new Integer(i));
if (checkAndSetState())
{
+ try
+ {
+ tx.rollback();
+ }
+ catch (Exception e)
+ {
+ }
return;
}
}
More information about the jboss-cvs-commits
mailing list