geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r600788 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Date Tue, 04 Dec 2007 04:22:42 GMT
Author: gawor
Date: Mon Dec  3 20:22:42 2007
New Revision: 600788

URL: http://svn.apache.org/viewvc?rev=600788&view=rev
Log:
make jndi available on destroy in Tomcat (GERONIMO-3667)

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=600788&r1=600787&r2=600788&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
Mon Dec  3 20:22:42 2007
@@ -41,6 +41,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.geronimo.NetworkConnector;
 import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.naming.java.RootContext;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.realm.TomcatGeronimoRealm;
 import org.apache.geronimo.tomcat.realm.TomcatJAASRealm;
@@ -368,11 +369,15 @@
             if (context instanceof GeronimoStandardContext) {
                 GeronimoStandardContext stdctx = (GeronimoStandardContext) context;
 
+                javax.naming.Context oldContext = RootContext.getComponentContext();
+                RootContext.setComponentContext(ctx.getJndiContext());
                 try {
                     stdctx.stop();
                     stdctx.destroy();
                 } catch (Exception e) {
                     throw new RuntimeException(e);
+                } finally {
+                    RootContext.setComponentContext(oldContext);
                 }
 
             }



Mime
View raw message