You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2009/05/22 04:25:10 UTC

svn commit: r777354 - /geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java

Author: xuhaihong
Date: Fri May 22 02:25:10 2009
New Revision: 777354

URL: http://svn.apache.org/viewvc?rev=777354&view=rev
Log:
GERONIMO-4545 TomcatJAASRealm keeps reference to undeployed EAR/WAR's classloader

Modified:
    geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java

Modified: geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=777354&r1=777353&r2=777354&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java (original)
+++ geronimo/server/branches/2.1/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java Fri May 22 02:25:10 2009
@@ -345,11 +345,15 @@
 
                     anotherCtxObj.setRealm(realm);
                 } else {
-                    //Use the parent since a name matches
-                    anotherCtxObj.setRealm(realm);
+                	//Since the parent holds a realm, no need to set the parent realm for the child context
+                    //For the getRealm() method will automatically delegate the request to its parent
+                    //And if we set the parent's realm to the child context, it will make the realm replace its initial container
+                    //with the child context, somewhat it will cause the child context could not be GCed after it is destroyed.
+                    //anotherCtxObj.setRealm(realm);
                 }
             } else {
-                anotherCtxObj.setRealm(realm);
+            	//The same reason with the above
+                //anotherCtxObj.setRealm(realm);
             }
         }