[jboss-cvs] JBossAS SVN: r85262 - branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 4 18:52:27 EST 2009


Author: remy.maucherat at jboss.com
Date: 2009-03-04 18:52:25 -0500 (Wed, 04 Mar 2009)
New Revision: 85262

Modified:
   branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java
Log:
- Fix two FIXMEs.
- If an executor is injected into the executor field, use it for the connectors.

Modified: branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java
===================================================================
--- branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java	2009-03-04 23:14:31 UTC (rev 85261)
+++ branches/Branch_5_x/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatService.java	2009-03-04 23:52:25 UTC (rev 85262)
@@ -28,6 +28,7 @@
 import java.io.InputStream;
 import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.Executor;
 
 import javax.management.MBeanServer;
 import javax.management.Notification;
@@ -88,6 +89,9 @@
    /** The associated Tomcat deployer * */
    private TomcatDeployer tomcatDeployer;
    
+   /** The executor the Tomcat service should use * */
+   private Executor executor;
+   
    // Use a flag because isInShutdown doesn't appear to be correct
    private boolean connectorsRunning = false;
 
@@ -201,7 +205,8 @@
          catalinaServer.addService(service);
          
          // Server/Service/Executor
-         // FIXME
+         // Executor is useless in JBoss: the Executor will get injected in the executor field
+         // and used directly
          
          // Server/Service/Connector
          if (serviceMetaData.getConnectors() != null)
@@ -223,6 +228,11 @@
                      IntrospectionUtils.setProperty(connector, name.getLocalPart(), value);
                   }
                }
+               if (executor != null)
+               {
+                  IntrospectionUtils.callMethod1(connector.getProtocolHandler(), "setExecutor", 
+                        executor, java.util.concurrent.Executor.class.getName(), getClass().getClassLoader());
+               }
                service.addConnector(connector);
             }
          }
@@ -260,8 +270,6 @@
                   (org.apache.catalina.Host) getInstance(hostMetaData, "org.apache.catalina.core.StandardHost");
                addLifecycleListeners(host, hostMetaData.getListeners());
                host.setName(hostMetaData.getName());
-               // FIXME: not really needed, and could hurt extensibility; probably needed until JBW GA with a fix
-               host.setConfigClass("org.jboss.web.tomcat.service.deployers.JBossContextConfig");
                engine.addChild(host);
                
                // Server/Service/Engine/Host/Realm




More information about the jboss-cvs-commits mailing list