Author: manik.surtani(a)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);
}
Show replies by date