geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r733006 - in /geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat: GeronimoServletHost.java ServletWrapper.java
Date Fri, 09 Jan 2009 10:58:55 GMT
Author: vamsic007
Date: Fri Jan  9 02:58:55 2009
New Revision: 733006

URL: http://svn.apache.org/viewvc?rev=733006&view=rev
Log:
Adding a servlet mapping to an already started context requires explicit JMX registration
without which the mapping info does not get updated in the connector.

Modified:
    geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/GeronimoServletHost.java
    geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/ServletWrapper.java

Modified: geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/GeronimoServletHost.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/GeronimoServletHost.java?rev=733006&r1=733005&r2=733006&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/GeronimoServletHost.java
(original)
+++ geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/GeronimoServletHost.java
Fri Jan  9 02:58:55 2009
@@ -190,7 +190,12 @@
         } catch (LifecycleException e) {
             log.fatal("The context named " + context.getName() + " failed to start",e);
             throw new IllegalArgumentException("The context named " + context.getName() +
" failed to start");
-        }                          
+        }
+        if(!newContext) {
+            // Adding a servlet mapping to an already started context requires explicit JMX
registration
+            // without which the mapping info does not get updated in the connector.
+            wrapper.registerJMX(context);
+        }
         log.debug("End of addServletMapping() method");
     }
 

Modified: geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/ServletWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/ServletWrapper.java?rev=733006&r1=733005&r2=733006&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/ServletWrapper.java
(original)
+++ geronimo/plugins/tuscany/trunk/geronimo-tuscany-http-tomcat/src/main/java/org/apache/geronimo/tuscany/http/tomcat/ServletWrapper.java
Fri Jan  9 02:58:55 2009
@@ -21,6 +21,7 @@
 import javax.servlet.Servlet;
 import javax.servlet.ServletException;
 
+import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.core.StandardWrapper;
 
 /**
@@ -52,4 +53,12 @@
     public void destroyServlet() {
         servlet.destroy();
     }
+    
+    /**
+     * This method is added since adding a servlet mapping to an already started context
requires explicit
+     * JMX registration without which the mapping info does not get updated in the connector.
+     */
+    public void registerJMX(StandardContext context) {
+        super.registerJMX(context);
+    }
 }



Mime
View raw message