geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r777350 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Date Fri, 22 May 2009 02:10:47 GMT
Author: xuhaihong
Date: Fri May 22 02:10:46 2009
New Revision: 777350

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

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

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=777350&r1=777349&r2=777350&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Fri May 22 02:10:46 2009
@@ -344,12 +344,16 @@
                     ((JAASRealm) realm).setAppName(securityRealmName);
 
                     anotherCtxObj.setRealm(realm);
-                } else {
-                    //Use the parent since a name matches
-                    anotherCtxObj.setRealm(realm);
+                } else {                    
+                    //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);
+            } else {                
+                //The same reason with the above
+                //anotherCtxObj.setRealm(realm);
             }
         }
         



Mime
View raw message