Details
Description
We generally don't clean up the logged in Subject when a web request returns. This results in a memory leak in ContextManager.subjectContexts. As well as geronimo changes I think this will need changes in the Jetty Authenticators we use. I think we control all the affected tomcat code. Ejb requests appear to already clean this up on exit.
As an application-level workaround your app can call:
Subject subject = ContextManager.getCurrentCaller();
ContextManager.unregisterSubject(subject);
immediately before control returns to the client. (I haven't tested this to make sure it doesn't break something else)
Thanks to Morten Svanaes and David Frahm for reporting this problem on the user list. There may be a similar problem in 2.1.x but the code and solution will be somewhat different.