tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r783305 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/connector/Connector.java java/org/apache/catalina/connector/MapperListener.java webapps/docs/changelog.xml
Date Wed, 10 Jun 2009 11:48:10 GMT
Author: markt
Date: Wed Jun 10 11:48:10 2009
New Revision: 783305

URL: http://svn.apache.org/viewvc?rev=783305&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47316
Allow Service name != Engine name. Regression in fix for 42707.

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=783305&r1=783304&r2=783305&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Jun 10 11:48:10 2009
@@ -124,13 +124,6 @@
   +1: markt, funkman
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47316
-  Remove use of ServerFactory to enable MapperListener to start when service
-  name != engine name
-  https://issues.apache.org/bugzilla/attachment.cgi?id=23764
-  +1: markt, kkolinko, funkman
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47299
   Simply code. Make it work with classes that extend StandardContext
   http://svn.apache.org/viewvc?rev=782145&view=rev

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java?rev=783305&r1=783304&r2=783305&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Connector.java Wed Jun 10 11:48:10
2009
@@ -263,7 +263,7 @@
      /**
       * Mapper listener.
       */
-     protected MapperListener mapperListener = new MapperListener(mapper);
+     protected MapperListener mapperListener = new MapperListener(mapper, this);
 
 
      /**

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java?rev=783305&r1=783304&r2=783305&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java Wed Jun 10
11:48:10 2009
@@ -29,7 +29,6 @@
 import org.apache.catalina.ContainerEvent;
 import org.apache.catalina.ContainerListener;
 import org.apache.catalina.Host;
-import org.apache.catalina.ServerFactory;
 import org.apache.catalina.core.StandardContext;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -62,6 +61,11 @@
      * Associated mapper.
      */
     protected Mapper mapper = null;
+    
+    /**
+     * Associated connector.
+     */
+    protected Connector connector = null;
 
     /**
      * MBean server.
@@ -85,8 +89,9 @@
     /**
      * Create mapper listener.
      */
-    public MapperListener(Mapper mapper) {
+    public MapperListener(Mapper mapper, Connector connector) {
         this.mapper = mapper;
+        this.connector = connector;
     }
 
 
@@ -329,9 +334,9 @@
         String name=objectName.getKeyProperty("host");
         if( name != null ) {        
 
-            Host host = (Host) ServerFactory.getServer().findService(
-                    domain).getContainer().findChild(name);
-        
+            Host host =
+                (Host) connector.getService().getContainer().findChild(name);
+
             String[] aliases = host.findAliases();
             mapper.addHost(name, aliases, objectName);
             host.addContainerListener(this);
@@ -349,8 +354,8 @@
         throws Exception {
         String name=objectName.getKeyProperty("host");
         if( name != null ) { 
-            Host host = (Host) ServerFactory.getServer().findService(
-                domain).getContainer().findChild(name);
+            Host host =
+                (Host) connector.getService().getContainer().findChild(name);
         
             mapper.removeHost(name);
             if (host != null) {

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=783305&r1=783304&r2=783305&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Jun 10 11:48:10 2009
@@ -71,6 +71,11 @@
         <bug>47228</bug>: Correct French translations. Patch provided by sebb.
         (markt)
       </fix>
+      <fix>
+        <bug>47316</bug>: Allow different values for Service name and Engine
+        name. This corrects a regression introduced by the fix for
+        <bug>42707</bug>. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message