[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Mon Aug 21 13:05:49 EDT 2006
User: msurtani
Date: 06/08/21 13:05:49
Modified: src/org/jboss/cache/interceptors
CacheLoaderInterceptor.java
Log:
fixed breaking cache loader code
Revision Changes Path
1.46 +8 -3 JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheLoaderInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheLoaderInterceptor.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- CacheLoaderInterceptor.java 18 Aug 2006 15:40:39 -0000 1.45
+++ CacheLoaderInterceptor.java 21 Aug 2006 17:05:49 -0000 1.46
@@ -23,7 +23,7 @@
/**
* Loads nodes that don't exist at the time of the call into memory from the CacheLoader
* @author Bela Ban
- * @version $Id: CacheLoaderInterceptor.java,v 1.45 2006/08/18 15:40:39 msurtani Exp $
+ * @version $Id: CacheLoaderInterceptor.java,v 1.46 2006/08/21 17:05:49 msurtani Exp $
*/
public class CacheLoaderInterceptor extends BaseCacheLoaderInterceptor implements CacheLoaderInterceptorMBean
{
@@ -93,6 +93,7 @@
InvocationContext ctx = cache.getInvocationContext();
TransactionEntry entry = null;
GlobalTransaction gtx = null;
+
if ((gtx = ctx.getGlobalTransaction()) != null)
{
entry = txTable.get(gtx);
@@ -235,8 +236,9 @@
for (Iterator i = children_names.iterator(); i.hasNext(); )
{
String child_name = (String)i.next();
- Fqn child_fqn = new Fqn(fqn, child_name);
+ Fqn child_fqn = new Fqn(child_name); // this is a RELATIVE Fqn!!
// create child if it didn't exist
+ cache.getInvocationContext().getOptionOverrides().setBypassInterceptorChain(true);
n.addChild(child_fqn);
findChild(n.getChildren(), child_name).put(TreeCache.UNINITIALIZED, null);
}
@@ -331,7 +333,8 @@
if (nodeData != null)
{
n = createNodes(fqn, entry);
- n.put(nodeData, true);
+ n.clearData();
+ n.put(nodeData);
}
else if (n != null && n.getKeys().contains(TreeCache.UNINITIALIZED))
{
@@ -384,6 +387,8 @@
{
//child_node = n.createChild(child_name, tmp_fqn, n, TreeCache.UNINITIALIZED, null);
child_node = n.addChild(new Fqn(child_name));
+ o = cache.getInvocationContext().getOptionOverrides();
+ o.setBypassInterceptorChain(true);
child_node.put(TreeCache.UNINITIALIZED, null);
}
More information about the jboss-cvs-commits
mailing list