geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1229280 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core: GeronimoConnectionFactory.java GeronimoServerBehaviourDelegate.java
Date Mon, 09 Jan 2012 18:03:58 GMT
Author: gawor
Date: Mon Jan  9 18:03:57 2012
New Revision: 1229280

URL: http://svn.apache.org/viewvc?rev=1229280&view=rev
Log:
GERONIMODEVTOOLS-780: IOException: The client has been closed

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java?rev=1229280&r1=1229279&r2=1229280&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoConnectionFactory.java
Mon Jan  9 18:03:57 2012
@@ -37,16 +37,13 @@ public class GeronimoConnectionFactory {
     private Map<String, DeploymentManager> connections = 
         Collections.synchronizedMap(new HashMap<String, DeploymentManager>());
 
-    private static GeronimoConnectionFactory instance;
+    private static GeronimoConnectionFactory instance = new GeronimoConnectionFactory();
 
     private GeronimoConnectionFactory() {
         super();
     }
 
     public static GeronimoConnectionFactory getInstance() {
-        if (instance == null) {
-            instance = new GeronimoConnectionFactory();
-        }
         return instance;
     }
 
@@ -77,11 +74,14 @@ public class GeronimoConnectionFactory {
     }
  
     public void destroy(IServer server) {
-        Trace.trace(Trace.INFO, "deploymentManager destroy", Activator.traceCore);
+        Trace.tracePoint("Entry", Activator.traceCore, "GeronimoConnectionFactory.destroy");
+
         DeploymentManager manager = connections.remove(server.getId());        
         if (manager != null) {
             // TODO: need to do reference counting or something else before releasing the
connection
             // manager.release();
         }
+        
+        Trace.tracePoint("Exit", Activator.traceCore, "GeronimoConnectionFactory.destroy");
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java?rev=1229280&r1=1229279&r2=1229280&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Mon Jan  9 18:03:57 2012
@@ -260,8 +260,6 @@ public class GeronimoServerBehaviourDele
         // request shutdown
         stopKernel();
         
-        server.getStopTimeout();
-        
         // wait for shutdown
         if (!waitForStopped(60 * 1000) || force) {
             ILaunch launch = server.getLaunch();
@@ -921,12 +919,14 @@ public class GeronimoServerBehaviourDele
     public void setServerStopped() {
         setServerState(IServer.STATE_STOPPED);
         resetModuleState();
+        stopSynchronizeProjectOnServerTask();
         if (defaultModuleHandler != null) {
             defaultModuleHandler.serverStopped();
         }
         if (osgiModuleHandler != null) {
             osgiModuleHandler.serverStopped();
         }
+        GeronimoConnectionFactory.getInstance().destroy(getServer());
     }
 
     public IGeronimoServer getGeronimoServer() {



Mime
View raw message