[jbosscache-commits] JBoss Cache SVN: r7210 - core/trunk/src/main/java/org/jboss/cache/interceptors.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Thu Nov 27 07:28:29 EST 2008


Author: manik.surtani at jboss.com
Date: 2008-11-27 07:28:29 -0500 (Thu, 27 Nov 2008)
New Revision: 7210

Modified:
   core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
Log:
Mem leak on Fqns in Invocation context

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java	2008-11-27 04:07:17 UTC (rev 7209)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/ActivationInterceptor.java	2008-11-27 12:28:29 UTC (rev 7210)
@@ -181,6 +181,10 @@
    private boolean wasLoadedIntoMemory(InvocationContext ctx, Fqn fqn)
    {
       Set<Fqn> fqnsLoaded = ctx.getFqnsLoaded();
+      // make sure we wipe this in the context otherwise this will leak.
+      // TODO: This should ideally be done in the InvocationContextInterceptor by calling InvocationContext.reset() on exit
+      // for now, just remove this here
+      ctx.setFqnsLoaded(null);
       return fqnsLoaded != null && fqnsLoaded.contains(fqn);
    }
 

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java	2008-11-27 04:07:17 UTC (rev 7209)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java	2008-11-27 12:28:29 UTC (rev 7210)
@@ -181,6 +181,10 @@
    private boolean wasLoadedIntoMemory(InvocationContext ctx, Fqn fqn)
    {
       Set<Fqn> fqnsLoaded = ctx.getFqnsLoaded();
+      // make sure we wipe this in the context otherwise this will leak.
+      // TODO: This should ideally be done in the InvocationContextInterceptor by calling InvocationContext.reset() on exit
+      // for now, just remove this here
+      ctx.setFqnsLoaded(null);
       return fqnsLoaded != null && fqnsLoaded.contains(fqn);
    }
 




More information about the jbosscache-commits mailing list