Will this be merged back to trunk?
--jason
On Jul 18, 2006, at 12:17 PM, [EMAIL PROTECTED] wrote:
Author: sppatel
Date: Tue Jul 18 12:17:04 2006
New Revision: 423206
URL: http://svn.apache.org/viewvc?rev=423206&view=rev
Log:
GERONIMO-1865
Added:
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/
geronimo/deployment/cli/CommandRestart.java (with props)
Modified:
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/
geronimo/deployment/cli/DeployTool.java
Added: geronimo/branches/1.1/modules/deploy-tool/src/java/org/
apache/geronimo/deployment/cli/CommandRestart.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/
deploy-tool/src/java/org/apache/geronimo/deployment/cli/
CommandRestart.java?rev=423206&view=auto
======================================================================
========
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/
geronimo/deployment/cli/CommandRestart.java (added)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/
geronimo/deployment/cli/CommandRestart.java Tue Jul 18 12:17:04 2006
@@ -0,0 +1,33 @@
+package org.apache.geronimo.deployment.cli;
+
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import java.io.PrintWriter;
+
+/**
+ * The CLI deployer logic to restart.
+ */
+public class CommandRestart extends CommandStart {
+ public CommandRestart() {
+ super("restart", "1. Common Commands", "[ModuleID|
TargetModuleID]+",
+ "Accepts the configId of a module, or the fully-
qualified " +
+ "TargetModuleID identifying both the module and
the server or cluster it's " +
+ "on, and restarts that module. The module should
be available to the server " +
+ "and running. If multiple modules are specified,
they will all be restarted.\n");
+ }
+
+ protected ProgressObject runCommand(PrintWriter out,
DeploymentManager mgr, TargetModuleID[] ids) {
+ ProgressObject po = mgr.stop(ids);
+ waitForProgress(out, po);
+ if(po.getDeploymentStatus().isCompleted()) {
+ po = mgr.start(ids);
+ waitForProgress(out, po);
+ }
+ return po;
+ }
+
+ protected String getAction() {
+ return "Restarted";
+ }
+}
Propchange: geronimo/branches/1.1/modules/deploy-tool/src/java/org/
apache/geronimo/deployment/cli/CommandRestart.java
----------------------------------------------------------------------
--------
svn:eol-style = native
Propchange: geronimo/branches/1.1/modules/deploy-tool/src/java/org/
apache/geronimo/deployment/cli/CommandRestart.java
----------------------------------------------------------------------
--------
svn:keywords = Date Rev
Propchange: geronimo/branches/1.1/modules/deploy-tool/src/java/org/
apache/geronimo/deployment/cli/CommandRestart.java
----------------------------------------------------------------------
--------
svn:mime-type = text/plain
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/
apache/geronimo/deployment/cli/DeployTool.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/
deploy-tool/src/java/org/apache/geronimo/deployment/cli/
DeployTool.java?rev=423206&r1=423205&r2=423206&view=diff
======================================================================
========
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/
geronimo/deployment/cli/DeployTool.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/
geronimo/deployment/cli/DeployTool.java Tue Jul 18 12:17:04 2006
@@ -73,6 +73,7 @@
registerCommand(new CommandRedeploy());
registerCommand(new CommandStart());
registerCommand(new CommandStop());
+ registerCommand(new CommandRestart());
registerCommand(new CommandUndeploy());
registerCommand(new CommandListConfigurations());
registerCommand(new CommandInstallCAR());