-
Patch
-
Resolution: Done
-
Minor
-
JBossAS-4.0.2 Final
-
None
In Container.invoke() at the beginning it is called
EJBArgsPolicyContextHandler.setArgs(mi.getArguments());
so args are assigned to ThreadLocal inside EJBArgsPolicyContextHandler. But at the end of the method the ThreadLocal is not cleaned, so, due to thread pool, mi.getArguments() remains in memory untill next Container.invoke() for the given thread. Solution is to call
EJBArgsPolicyContextHandler.setArgs(null);
at the end of the method.
"diff -c" follows
-
-
- Container.java.orig Thu Mar 31 16:59:12 2005
- Container.java Wed May 25 13:38:08 2005
***************
- 919,928 ****
// Restore the incoming context id
contextID = SecurityActions.setContextID(contextID);
-
- // Remove msg from ThreadLocal to prevent leakage into the thread pool
if (mi.getType() == InvocationType.SERVICE_ENDPOINT) { SOAPMsgPolicyContextHandler.setMessage(null); }}
}-
- 919,933 ----
// Restore the incoming context id
contextID = SecurityActions.setContextID(contextID);
- 919,933 ----
-
if (mi.getType() == InvocationType.SERVICE_ENDPOINT)
{ + // Remove msg from ThreadLocal to prevent leakage into the thread pool SOAPMsgPolicyContextHandler.setMessage(null); + }+ else
+
}
}