Author: manik.surtani(a)jboss.com
Date: 2008-01-01 17:27:17 -0500 (Tue, 01 Jan 2008)
New Revision: 4928
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/test/java/org/jboss/cache/transaction/isolationlevels/NoneTest.java
Log:
Fixed PLI not creating nonexistent nodes when isolation level is none
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2007-12-30
21:45:04 UTC (rev 4927)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-01-01
22:27:17 UTC (rev 4928)
@@ -91,7 +91,7 @@
private Object handlePutMethod(InvocationContext ctx, Fqn fqn)
throws Throwable
{
- if (ctx.getOptionOverrides() != null &&
ctx.getOptionOverrides().isSuppressLocking())
+ if ((ctx.getOptionOverrides() != null &&
ctx.getOptionOverrides().isSuppressLocking()) || configuration.getIsolationLevel() ==
IsolationLevel.NONE)
{
log.trace("Suppressing locking");
log.trace("Creating nodes if necessary");
@@ -310,10 +310,8 @@
boolean acquireLockOnParent, boolean
reverseRemoveCheck)
throws InterruptedException
{
- if (fqn == null || configuration.getIsolationLevel() == IsolationLevel.NONE)
- {
- return false;
- }
+ if (fqn == null) return false;
+
boolean created;
long timeout = zeroLockTimeout ? 0 :
ctx.getContextLockAcquisitionTimeout(lock_acquisition_timeout);
// make sure we can bail out of this loop
Modified:
core/trunk/src/test/java/org/jboss/cache/transaction/isolationlevels/NoneTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/transaction/isolationlevels/NoneTest.java 2007-12-30
21:45:04 UTC (rev 4927)
+++
core/trunk/src/test/java/org/jboss/cache/transaction/isolationlevels/NoneTest.java 2008-01-01
22:27:17 UTC (rev 4928)
@@ -1,11 +1,13 @@
package org.jboss.cache.transaction.isolationlevels;
import org.jboss.cache.lock.IsolationLevel;
+import org.testng.annotations.Test;
/**
* @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
* @since 2.0.0
*/
+@Test(groups = {"functional", "transaction"})
public class NoneTest extends IsolationLevelTestBase
{
public NoneTest()
Show replies by date