geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1033819 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
Date Thu, 11 Nov 2010 05:55:40 GMT
Author: xuhaihong
Date: Thu Nov 11 05:55:39 2010
New Revision: 1033819

URL: http://svn.apache.org/viewvc?rev=1033819&view=rev
Log:
Avoid duplicate InstanceManager is created on each getInstanceManager invocation

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=1033819&r1=1033818&r2=1033819&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
Thu Nov 11 05:55:39 2010
@@ -121,6 +121,7 @@ public class TomcatWebAppContext impleme
     private final ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager;
     private final Map<String,String> contextAttributes;
     private final Map<String, Object> owbContext;
+    private final InstanceManager instanceManager;
 
     // JSR 77
     private final String j2EEServer;
@@ -287,6 +288,7 @@ public class TomcatWebAppContext impleme
             j2EEApplication = null;
         }
         owbContext = sharedOwbContext == null? null: sharedOwbContext.getOWBContext();
+        instanceManager = new TomcatInstanceManager(holder, classLoader, componentContext);
     }
 
     private Map<String, WebServiceContainer> createWebServices(Map<String, AbstractName>
webServiceFactoryMap, Kernel kernel) throws Exception {
@@ -449,7 +451,7 @@ public class TomcatWebAppContext impleme
     }
 
     public InstanceManager getInstanceManager() {
-        return new TomcatInstanceManager(holder, classLoader, componentContext);
+        return instanceManager;
     }
 
     public Bundle getBundle() {
@@ -557,7 +559,6 @@ public class TomcatWebAppContext impleme
         return owbContext;
     }
 
-
     public void doStart() throws Exception {
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         try {



Mime
View raw message