Return-Path: X-Original-To: apmail-geronimo-scm-archive@www.apache.org Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A4D4791CB for ; Thu, 12 Apr 2012 05:58:10 +0000 (UTC) Received: (qmail 70684 invoked by uid 500); 12 Apr 2012 05:58:10 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 70395 invoked by uid 500); 12 Apr 2012 05:58:04 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 70347 invoked by uid 99); 12 Apr 2012 05:58:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 05:58:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 05:58:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 33F4D2388962; Thu, 12 Apr 2012 05:57:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: gawor@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120412055741.33F4D2388962@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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(); } } }