geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r818731 - /geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
Date Fri, 25 Sep 2009 06:14:54 GMT
Author: xuhaihong
Date: Fri Sep 25 06:14:54 2009
New Revision: 818731

URL: http://svn.apache.org/viewvc?rev=818731&view=rev
Log:
GERONIMO-4876 "java.net.ConnectException" when I shutdown the server

Modified:
    geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java

Modified: geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java?rev=818731&r1=818730&r2=818731&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
(original)
+++ geronimo/server/branches/2.2/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
Fri Sep 25 06:14:54 2009
@@ -56,7 +56,8 @@
 
     private String name;
     
-
+    private boolean wrappedConnector;
+    
     public ConnectorGBean(@ParamAttribute(manageable=false, name = "name") String name,
                         @ParamAttribute(manageable=false, name = "initParams") Map<String,
String> initParams,
                         @ParamAttribute(manageable=false, name = "protocol") String tomcatProtocol,
@@ -93,13 +94,14 @@
 
         // Create the Connector object
         if (conn == null) {
-            this.connector= new Connector(tomcatProtocol);
-           
-            for(LifecycleListener listener:TomcatServerGBean.LifecycleListeners){
+            this.connector = new Connector(tomcatProtocol);
+            for (LifecycleListener listener : TomcatServerGBean.LifecycleListeners) {
                 this.connector.addLifecycleListener(listener);
             }
-        }else{
-            connector=conn;
+            wrappedConnector = false;
+        } else {
+            connector = conn;
+            wrappedConnector = true;
         }
         
         setParameters(connector, initParams);
@@ -112,7 +114,11 @@
     }
 
     public void doStart() throws LifecycleException {
-        
+
+        if (wrappedConnector) {
+            return;
+        }
+
         String executorName=null;
         Executor executor=null;
         
@@ -174,12 +180,13 @@
 
     }
 
-    public void doStop() {
-
-        container.removeConnector(connector);
+    public void doStop() {        
+        if (!wrappedConnector) {
+            container.removeConnector(connector);
+        }
         log.debug("{} connector stopped", name);
     }
-    
+
     /**
      * Ensures that this implementation can handle the requested protocol.
      * @param protocol



Mime
View raw message