geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r372941 - /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
Date Fri, 27 Jan 2006 18:34:23 GMT
Author: sppatel
Date: Fri Jan 27 10:34:21 2006
New Revision: 372941

URL: http://svn.apache.org/viewcvs?rev=372941&view=rev
Log:
GERONIMODEVTOOLS-39 safety net

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java?rev=372941&r1=372940&r2=372941&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/internal/GeronimoServerBehaviour.java
Fri Jan 27 10:34:21 2006
@@ -145,34 +145,11 @@
 
 		return kernel;
 	}
-	
+
 	protected void setServerStarted() {
 		super.setServerStarted();
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jst.server.generic.core.internal.GenericServerBehaviour#setServerStarted()
-	 */
-	/*protected void setServerStarted() {
-		Trace.trace(Trace.INFO, "--> setServerStarted()");
-		for (int tries = MAX_TRIES; tries > 0; tries--) {
-			try {
-				Thread.sleep(5000);
-			} catch (InterruptedException e1) {
-				// ignore
-			}
-			boolean isFullyStarted = isKernelFullyStarted();
-			Trace.trace(Trace.INFO, "kernelFullyStarted = " + isFullyStarted);
-			if (isFullyStarted) {
-				setServerState(IServer.STATE_STARTED);
-				break;
-			}
-		}
-		Trace.trace(Trace.INFO, "<-- setServerStarted()");
-	}*/
-
 	protected boolean isKernelAlive() {
 		try {
 			return getKernel() != null && kernel.isRunning();
@@ -241,7 +218,8 @@
 		try {
 			switch (deltaKind) {
 			case ADDED: {
-				doDeploy(module);
+				deploy(module);
+				// doDeploy(module);
 				break;
 			}
 			case CHANGED: {
@@ -262,6 +240,12 @@
 		}
 	}
 
+	/**
+	 * Safty net to prevent a deploy call on an existing configuration.
+	 * 
+	 * @param module
+	 * @throws Exception
+	 */
 	private void deploy(IModule module) throws Exception {
 		DeploymentManager dm = DeploymentCommandFactory
 				.getDeploymentManager(getServer());
@@ -270,7 +254,7 @@
 		} else {
 			GeronimoPlugin
 					.log(
-							Status.WARNING,
+							Status.ERROR,
 							"Configuration with id "
 									+ GeronimoUtils.getConfigId(module)
 									+ "already exists.  Existing configuration will be overwritten with redeploy.",
@@ -405,6 +389,8 @@
 	protected void setupLaunch(ILaunch launch, String launchMode,
 			IProgressMonitor monitor) throws CoreException {
 
+		Trace.trace(Trace.INFO, "--> GeronimoServerBehavior.setupLaunch()");
+
 		if ("true".equals(launch.getLaunchConfiguration().getAttribute(
 				ATTR_STOP, "false")))
 			return;
@@ -412,8 +398,6 @@
 		if (!SocketUtil.isLocalhost(getServer().getHost()))
 			return;
 
-		String host = getServer().getHost();
-
 		ServerPort[] ports = getServer().getServerPorts(null);
 		for (int i = 0; i < ports.length; i++) {
 			ServerPort sp = ports[i];
@@ -449,6 +433,8 @@
 
 		PingThread pingThread = new PingThread(this);
 		pingThread.start();
+
+		Trace.trace(Trace.INFO, "<-- GeronimoServerBehavior.setupLaunch()");
 
 	}
 



Mime
View raw message