Author: dereed
Date: 2012-07-24 21:19:25 -0400 (Tue, 24 Jul 2012)
New Revision: 8519
Modified:
core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java
Log:
[JBCACHE-1607] Don't remove locks from other threads
Modified: core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java 2012-07-25
00:48:15 UTC (rev 8518)
+++ core/trunk/src/main/java/org/jboss/cache/LegacyRegionManagerImpl.java 2012-07-25
01:19:25 UTC (rev 8519)
@@ -109,13 +109,13 @@
if (parent != null)
{
log.debug("forcing release of locks in parent");
- lockManager.unlockAll(parent);
+ lockManager.unlockAll(parent, getOwnerForLock());
}
parentLocked = false;
log.debug("forcing release of all locks in subtree");
- lockManager.unlockAll(subtreeRoot);
+ lockManager.unlockAll(subtreeRoot, getOwnerForLock());
subtreeLocked = false;
}
}
@@ -137,7 +137,7 @@
log.debug("forcing release of locks in parent");
try
{
- if (parent != null) lockManager.unlockAll(parent);
+ if (parent != null) lockManager.unlockAll(parent, getOwnerForLock());
}
catch (Throwable t)
{
@@ -149,7 +149,7 @@
log.debug("forcing release of all locks in subtree");
try
{
- if (subtreeRoot != null) lockManager.unlockAll(subtreeRoot);
+ if (subtreeRoot != null) lockManager.unlockAll(subtreeRoot,
getOwnerForLock());
}
catch (Throwable t)
{
@@ -166,4 +166,4 @@
Object owner = cache.getCurrentTransaction();
return owner == null ? Thread.currentThread() : owner;
}
-}
\ No newline at end of file
+}