geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r359401 - in /geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core: commands/ internal/
Date Wed, 28 Dec 2005 05:32:22 GMT
Author: sppatel
Date: Tue Dec 27 21:32:14 2005
New Revision: 359401

URL: http://svn.apache.org/viewcvs?rev=359401&view=rev
Log:
cleanup, fix tracing

Modified:
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/DistributeCommand.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/RedeployCommand.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StartCommand.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StopCommand.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/SynchronizedDeploymentOp.java
    geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/UndeployCommand.java
    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/commands/DistributeCommand.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/commands/DistributeCommand.java?rev=359401&r1=359400&r2=359401&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/DistributeCommand.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/DistributeCommand.java
Tue Dec 27 21:32:14 2005
@@ -35,13 +35,13 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute()
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus execute(IProgressMonitor monitor) {
 		Target[] targets = getDeploymentManager().getTargets();
 		File jarFile = createJarFile(getModule());
-		return new DeploymentCmdStatus(Status.OK_STATUS,
-				getDeploymentManager().distribute(targets, jarFile, null));
+		return new DeploymentCmdStatus(Status.OK_STATUS, getDeploymentManager()
+				.distribute(targets, jarFile, null));
 	}
 
 	/*

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/RedeployCommand.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/commands/RedeployCommand.java?rev=359401&r1=359400&r2=359401&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/RedeployCommand.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/RedeployCommand.java
Tue Dec 27 21:32:14 2005
@@ -32,10 +32,8 @@
 		super(dm, module);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute()
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus execute(IProgressMonitor monitor) {
 		TargetModuleID id = getTargetModuleID(getModule());

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StartCommand.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/commands/StartCommand.java?rev=359401&r1=359400&r2=359401&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StartCommand.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StartCommand.java
Tue Dec 27 21:32:14 2005
@@ -37,11 +37,11 @@
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute()
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus execute(IProgressMonitor monitor) {
-		return new DeploymentCmdStatus(Status.OK_STATUS,
-				getDeploymentManager().start(ids));
+		return new DeploymentCmdStatus(Status.OK_STATUS, getDeploymentManager()
+				.start(ids));
 	}
 
 	/*

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StopCommand.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/commands/StopCommand.java?rev=359401&r1=359400&r2=359401&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StopCommand.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/StopCommand.java
Tue Dec 27 21:32:14 2005
@@ -30,10 +30,8 @@
 		super(dm, module);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute()
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus execute(IProgressMonitor monitor) {
 		TargetModuleID id = getTargetModuleID(getModule());

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/SynchronizedDeploymentOp.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/commands/SynchronizedDeploymentOp.java?rev=359401&r1=359400&r2=359401&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/SynchronizedDeploymentOp.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/SynchronizedDeploymentOp.java
Tue Dec 27 21:32:14 2005
@@ -1,3 +1,18 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
 package org.apache.geronimo.core.commands;
 
 import javax.enterprise.deploy.shared.CommandType;
@@ -33,6 +48,9 @@
 		this.command = command;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute(org.eclipse.core.runtime.IProgressMonitor)
+	 */
 	public IStatus execute(IProgressMonitor monitor) {
 
 		_monitor = monitor;
@@ -78,6 +96,9 @@
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see javax.enterprise.deploy.spi.status.ProgressListener#handleProgressEvent(javax.enterprise.deploy.spi.status.ProgressEvent)
+	 */
 	public void handleProgressEvent(ProgressEvent event) {
 		DeploymentStatus deploymentStatus = event.getDeploymentStatus();
 		if (deploymentStatus != null) {
@@ -100,10 +121,16 @@
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#getCommandType()
+	 */
 	public CommandType getCommandType() {
 		return command.getCommandType();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#getModule()
+	 */
 	public IModule getModule() {
 		return command.getModule();
 	}

Modified: geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/UndeployCommand.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/commands/UndeployCommand.java?rev=359401&r1=359400&r2=359401&view=diff
==============================================================================
--- geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/UndeployCommand.java
(original)
+++ geronimo/devtools/trunk/modules/eclipse-plugin/plugins/org.apache.geronimo.devtools.eclipse.core/src/org/apache/geronimo/core/commands/UndeployCommand.java
Tue Dec 27 21:32:14 2005
@@ -30,10 +30,8 @@
 		super(dm, module);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute()
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.core.commands.IDeploymentCommand#execute(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus execute(IProgressMonitor monitor) {
 		TargetModuleID id = getTargetModuleID(getModule());

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=359401&r1=359400&r2=359401&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
Tue Dec 27 21:32:14 2005
@@ -21,7 +21,6 @@
 import java.util.Set;
 
 import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
 import javax.management.MBeanServerConnection;
 import javax.management.ObjectName;
 import javax.management.remote.JMXConnector;
@@ -177,56 +176,48 @@
 	 */
 	public void publishModule(int kind, int deltaKind, IModule[] module,
 			IProgressMonitor monitor) throws CoreException {
-
-		Trace.trace(Trace.INFO, "publishModule()" + module + " "
-				+ module.length + " deltaKind=" + deltaKind);
-
+		
+		Trace.trace(Trace.INFO, ">> publishModule(), deltaKind = " + kind + ", size = " +
module.length);
 		_monitor = monitor;
 
-		if (deltaKind == NO_CHANGE) {
-			Trace.trace(Trace.INFO,
-					"deltaKind = NO_CHANGE, returning out of publishModule()");
-			return;
-		}
-
-		if (module.length == 1) {
+		if (deltaKind != NO_CHANGE && module.length == 1) {
 			invokeCommand(deltaKind, module[0]);
 		}
+		
+		Trace.trace(Trace.INFO, "<< publishModule()");
+
 	}
 
 	private void invokeCommand(int deltaKind, IModule module)
 			throws CoreException {
 
-		Trace.trace(Trace.INFO, "calling invokeComand()" + module);
+		Trace.trace(Trace.INFO, ">> invokeCommand() " + module.toString());
 
-		try {
-			switch (deltaKind) {
-			case ADDED: {
-				Trace.trace(Trace.INFO, "calling doDeploy()");
-				doDeploy(module);
-				break;
-			}
-			case CHANGED: {
-				Trace.trace(Trace.INFO, "calling doRedeploy()");
-				doRedeploy(module);
-				break;
-			}
-			case REMOVED: {
-				Trace.trace(Trace.INFO, "calling doUndeploy()");
-				doUndeploy(module);
-				break;
-			}
-			default:
-				throw new IllegalArgumentException();
-			}
-		} catch (DeploymentManagerCreationException e) {
-			e.printStackTrace();
-			throw new CoreException(new Status(IStatus.ERROR,
-					GeronimoPlugin.PLUGIN_ID, 0, e.getMessage(), e));
+		switch (deltaKind) {
+		case ADDED: {
+			doDeploy(module);
+			break;
+		}
+		case CHANGED: {
+			doRedeploy(module);
+			break;
 		}
+		case REMOVED: {
+			doUndeploy(module);
+			break;
+		}
+		default:
+			throw new IllegalArgumentException();
+		}
+
+		Trace.trace(Trace.INFO, "<< invokeCommand() " + module.toString());
+
 	}
 
 	private void doDeploy(IModule module) throws CoreException {
+
+		Trace.trace(Trace.INFO, ">> doDeploy() " + module.toString());
+
 		IDeploymentCommand op = DeploymentCommandFactory
 				.createDistributeCommand(module, getServer());
 		IStatus status = op.execute(_monitor);
@@ -236,9 +227,11 @@
 		}
 
 		if (status instanceof DeploymentCmdStatus) {
-			TargetModuleID[] ids = ((DeploymentCmdStatus) status).getResultTargetModuleIDs();
- 
-			op = DeploymentCommandFactory.createStartCommand(ids, module, getServer());
+			TargetModuleID[] ids = ((DeploymentCmdStatus) status)
+					.getResultTargetModuleIDs();
+
+			op = DeploymentCommandFactory.createStartCommand(ids, module,
+					getServer());
 
 			status = op.execute(_monitor);
 
@@ -246,9 +239,15 @@
 				doFail(status, Messages.START_FAIL);
 			}
 		}
+
+		Trace.trace(Trace.INFO, "<< doDeploy() " + module.toString());
+
 	}
 
 	private void doRedeploy(IModule module) throws CoreException {
+
+		Trace.trace(Trace.INFO, ">> doRedeploy() " + module.toString());
+
 		IDeploymentCommand op = DeploymentCommandFactory.createRedeployCommand(
 				module, getServer());
 
@@ -257,10 +256,14 @@
 		if (!status.isOK()) {
 			doFail(status, Messages.REDEPLOY_FAIL);
 		}
+
+		Trace.trace(Trace.INFO, "<< doRedeploy() " + module.toString());
 	}
 
-	private void doUndeploy(IModule module) throws CoreException,
-			DeploymentManagerCreationException {
+	private void doUndeploy(IModule module) throws CoreException {
+
+		Trace.trace(Trace.INFO, ">> doUndeploy() " + module.toString());
+
 		IDeploymentCommand op = DeploymentCommandFactory.createStopCommand(
 				module, getServer());
 
@@ -278,6 +281,9 @@
 		if (!status.isOK()) {
 			doFail(status, Messages.UNDEPLOY_FAIL);
 		}
+
+		Trace.trace(Trace.INFO, "<< doUndeploy()" + module.toString());
+
 	}
 
 	private void doFail(IStatus status, String message) throws CoreException {



Mime
View raw message