[jboss-cvs] JBossCache/src/org/jboss/cache ...
Brian Stansberry
brian.stansberry at jboss.com
Wed Nov 22 16:37:37 EST 2006
User: bstansberry
Date: 06/11/22 16:37:37
Modified: src/org/jboss/cache Tag: JBossCache_1_3_0_SP3_JBCACHE-873
TransactionTable.java TransactionEntry.java
TreeCache.java
Log:
[JBCACHE-873] Fix JBCACHE-871 for Siemens
Revision Changes Path
No revision
No revision
1.5.6.1 +18 -1 JBossCache/src/org/jboss/cache/TransactionTable.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TransactionTable.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TransactionTable.java,v
retrieving revision 1.5
retrieving revision 1.5.6.1
diff -u -b -r1.5 -r1.5.6.1
--- TransactionTable.java 12 Jan 2006 04:25:47 -0000 1.5
+++ TransactionTable.java 22 Nov 2006 21:37:37 -0000 1.5.6.1
@@ -26,7 +26,7 @@
* (GlobalTransaction). Also keys modifications and undo-operations) under a given TX
*
* @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 14, 2003
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.5.6.1 $
*/
public class TransactionTable {
@@ -150,6 +150,23 @@
entry.addLocks(locks);
}
+ /**
+ * Adds a node that has been removed to the global transaction
+ */
+ public void addRemovedNode(GlobalTransaction gtx, Fqn fqn)
+ {
+ TransactionEntry entry=get(gtx);
+ if(entry == null) {
+ log.error("transaction entry not found for (gtx=" + gtx + ")");
+ return;
+ }
+ entry.addRemovedNode(fqn);
+
+ }
+
+ /**
+ * Returns summary debug information.
+ */
public String toString() {
StringBuffer sb=new StringBuffer();
sb.append(tx_map.size()).append(" mappings, ");
1.3.6.1 +31 -1 JBossCache/src/org/jboss/cache/TransactionEntry.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TransactionEntry.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TransactionEntry.java,v
retrieving revision 1.3
retrieving revision 1.3.6.1
diff -u -b -r1.3 -r1.3.6.1
--- TransactionEntry.java 10 Jan 2006 14:38:44 -0000 1.3
+++ TransactionEntry.java 22 Nov 2006 21:37:37 -0000 1.3.6.1
@@ -12,6 +12,7 @@
import org.jgroups.blocks.MethodCall;
import javax.transaction.Transaction;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
@@ -32,7 +33,7 @@
* </ul>
*
* @author <a href="mailto:bela at jboss.org">Bela Ban</a> Apr 14, 2003
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.3.6.1 $
*/
public class TransactionEntry {
@@ -61,6 +62,12 @@
*/
protected List locks=new LinkedList();
+ /**
+ * List<Fqn> of nodes that have been removed by the transaction
+ */
+ protected List removedNodes = new LinkedList();
+
+
@@ -81,6 +88,29 @@
undo_list.add(m);
}
+ /**
+ * Adds the node that has been removed.
+ *
+ * @param fqn
+ */
+ public void addRemovedNode(Fqn fqn) {
+ removedNodes.add(fqn);
+ }
+
+ /**
+ * Gets the list of removed nodes.
+ *
+ * @return
+ */
+ public List getRemovedNodes()
+ {
+ return new ArrayList(removedNodes);
+ }
+
+ /**
+ * Returns the undo operations in use.
+ * Note: This list may be concurrently modified.
+ */
public List getUndoOperations() {
return undo_list;
}
1.142.4.1.2.1 +3 -2 JBossCache/src/org/jboss/cache/TreeCache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
retrieving revision 1.142.4.1
retrieving revision 1.142.4.1.2.1
diff -u -b -r1.142.4.1 -r1.142.4.1.2.1
--- TreeCache.java 7 Nov 2006 18:22:58 -0000 1.142.4.1
+++ TreeCache.java 22 Nov 2006 21:37:37 -0000 1.142.4.1.2.1
@@ -60,7 +60,7 @@
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author Brian Stansberry
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Id: TreeCache.java,v 1.142.4.1 2006/11/07 18:22:58 bstansberry Exp $
+ * @version $Id: TreeCache.java,v 1.142.4.1.2.1 2006/11/22 21:37:37 bstansberry Exp $
* <p/>
*/
public class TreeCache extends ServiceMBeanSupport implements TreeCacheMBean, Cloneable, MembershipListener
@@ -4090,7 +4090,8 @@
parent_node.setChildrenLoaded(false);
// release all locks for the entire subtree
- n.releaseAll(tx != null ? tx : (Object) Thread.currentThread());
+ // JBCACHE-871 -- this is not correct! This is the lock interceptor's task
+// n.releaseAll(tx != null ? tx : (Object) Thread.currentThread());
// create a compensating method call (reverting the effect of
// this modification) and put it into the TX's undo list.
More information about the jboss-cvs-commits
mailing list