Author: mircea.markus
Date: 2008-08-28 12:27:09 -0400 (Thu, 28 Aug 2008)
New Revision: 6633
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
core/trunk/src/test/java/org/jboss/cache/lock/UpgradeLockTest.java
Log:
this scenario is only acceptable in a pessimistic locking scheme
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-08-28
16:25:14 UTC (rev 6632)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-08-28
16:27:09 UTC (rev 6633)
@@ -666,10 +666,6 @@
/**
* Creates a gtx (if one doesnt exist), a sync handler, and registers the tx.
- *
- * @param tx
- * @return
- * @throws Exception
*/
private GlobalTransaction registerTransaction(Transaction tx, InvocationContext ctx)
throws Exception
{
@@ -716,10 +712,6 @@
/**
* Registers a sync hander against a tx.
- *
- * @param tx
- * @param handler
- * @throws Exception
*/
private void registerHandler(Transaction tx, Synchronization handler,
InvocationContext ctx) throws Exception
{
Modified: core/trunk/src/test/java/org/jboss/cache/lock/UpgradeLockTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/lock/UpgradeLockTest.java 2008-08-28 16:25:14
UTC (rev 6632)
+++ core/trunk/src/test/java/org/jboss/cache/lock/UpgradeLockTest.java 2008-08-28 16:27:09
UTC (rev 6633)
@@ -10,6 +10,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.transaction.DummyTransactionManager;
import static org.testng.AssertJUnit.assertEquals;
import org.testng.annotations.AfterMethod;
@@ -87,6 +88,7 @@
private CacheSPI<Object, Object> createCache(IsolationLevel level)
{
CacheSPI<Object, Object> c = (CacheSPI<Object, Object>) new
DefaultCacheFactory<Object, Object>().createCache(false);
+
c.getConfiguration().setNodeLockingScheme(Configuration.NodeLockingScheme.PESSIMISTIC);
c.getConfiguration().setClusterName("test");
c.getConfiguration().setStateRetrievalTimeout(10000);
c.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.JBossTransactionManagerLookup");