geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1325121 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Date Thu, 12 Apr 2012 05:57:41 GMT
Author: gawor
Date: Thu Apr 12 05:57:40 2012
New Revision: 1325121

URL: http://svn.apache.org/viewvc?rev=1325121&view=rev
Log:
stop synchronization task when server is forcibly killed

Modified:
    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/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=1325121&r1=1325120&r2=1325121&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
Thu Apr 12 05:57:40 2012
@@ -244,7 +244,7 @@ public class GeronimoServerBehaviourDele
     }
 
     /*
-     * (non-Javadoc)
+     * Called when server is shutdown (Server view -> stop).
      * 
      * @see org.eclipse.wst.server.core.model.ServerBehaviourDelegate#stop(boolean)
      */
@@ -303,6 +303,21 @@ public class GeronimoServerBehaviourDele
         Trace.tracePoint("Exit", Activator.traceCore, "GeronimoServerBehaviourDelegate.waitForStopped",
stopped);
         return stopped;
     }
+
+    /*
+     * Called when server process is killed (Console view -> stop).
+     */
+    public void terminate() {
+        Trace.traceEntry(Activator.traceCore, "GeronimoServerBehaviourDelegate.terminate");
+        
+        // stop threads
+        stopPingThread();
+        stopSynchronizeProjectOnServerTask();
+        
+        stopImpl(); 
+        
+        Trace.traceExit(Activator.traceCore, "GeronimoServerBehaviourDelegate.terminate");
+    }
     
     private void setStatus(IModule[] module, IStatus status, MultiStatus multiStatus) {
         if (status.isOK()) {
@@ -1254,7 +1269,7 @@ public class GeronimoServerBehaviourDele
                     int size = events.length;
                     for (int i = 0; i < size; i++) {
                         if (newProcess.equals(events[i].getSource()) && events[i].getKind()
== DebugEvent.TERMINATE) {
-                            stopImpl();
+                            terminate();
                         }
                     }
                 }



Mime
View raw message