geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r416514 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java
Date Thu, 22 Jun 2006 23:43:34 GMT
Author: sppatel
Date: Thu Jun 22 16:43:33 2006
New Revision: 416514

URL: http://svn.apache.org/viewvc?rev=416514&view=rev
Log:
fix pingthread

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java?rev=416514&r1=416513&r2=416514&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServerBehaviour.java
Thu Jun 22 16:43:33 2006
@@ -64,7 +64,7 @@
 	public void setServerStarted() {
 		setServerState(IServer.STATE_STARTED);
 	}
-
+	
 	public void setServerStopped() {
 		setServerState(IServer.STATE_STOPPED);
 	}
@@ -303,13 +303,11 @@
 		IServerListener listener = new IServerListener() {
 			public void serverChanged(ServerEvent event) {
 				int eventKind = event.getKind();
-				if (eventKind == (ServerEvent.SERVER_CHANGE | ServerEvent.STATE_CHANGE)) {
-					IServer server = event.getServer();
-					int state = server.getServerState();
-					if (state == IServer.STATE_STARTED
-							|| state == IServer.STATE_STOPPED) {
-						GenericGeronimoServerBehaviour.this.getServer()
-								.removeServerListener(this);
+				if ((eventKind & ServerEvent.STATE_CHANGE) != 0) {
+					int state = event.getServer().getServerState();
+					System.out.println(state);
+					if (state == IServer.STATE_STARTED || state == IServer.STATE_STOPPED) {
+						GenericGeronimoServerBehaviour.this.getServer().removeServerListener(this);
 						startUpdateServerStateTask();
 					}
 				}
@@ -317,9 +315,15 @@
 		};
 
 		getServer().addServerListener(listener);
+		Trace.trace(Trace.INFO, "<-- GeronimoServerBehavior.setupLaunch()");
+	}
+	
+	 /* (non-Javadoc)
+	 * @see org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour#startPingThread()
+	 */
+	protected void startPingThread() {
 		pingThread = new PingThread(this, getServer());
 		pingThread.start();
-		Trace.trace(Trace.INFO, "<-- GeronimoServerBehavior.setupLaunch()");
 	}
 
 	protected void startUpdateServerStateTask() {



Mime
View raw message