https://issues.apache.org/bugzilla/show_bug.cgi?id=50282

           Summary: Reference from
                    javax.security.auth.login.LoginContext.contextClassLoa
                    der initalized in static code block prevents an
                    undeployed Web application from being garbage
                    collected (similar to #49669)
           Product: Tomcat 7
           Version: 7.0.4
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: justin.almqu...@pnl.gov


The class javax.security.auth.login.LoginContext has a "contextClassLoader"
field that I believe is causing a similar problem as identified in bug #49669,
which is related to the class not being garbage collected even though the
application has been undeployed.

https://issues.apache.org/bugzilla/show_bug.cgi?id=49669

I was able to notice this by deploying a very simple spring-based webapp that
utilizes javax.security for authentication in which the LoginContext class is
used.

I then used YourKit profiler as specified in this writeup to find any lingering
classes without instances:

http://www.yourkit.com/docs/kb/class_loaders.jsp

The following class had the most instances (inside of a WebappClassLoader):
"contextClassLoader of javax.security.auth.login.Configuration [Class]"

This looks almost identical to bug #49669 with the only difference being that
the contextClassLoader field isn't static, however it is initialized in a
static code block.  Thus, it looks like the solution for bug #49669 would solve
this problem as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to