You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2008/03/13 04:11:39 UTC

svn commit: r636611 - in /geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands: ServerProxy.java StopServerCommand.groovy

Author: gawor
Date: Wed Mar 12 20:11:37 2008
New Revision: 636611

URL: http://svn.apache.org/viewvc?rev=636611&view=rev
Log:
make stop-server behave a little nicer (GERONIMO-3881)

Modified:
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java?rev=636611&r1=636610&r2=636611&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java Wed Mar 12 20:11:37 2008
@@ -193,14 +193,8 @@
         return lastError;
     }
 
-    public void shutdown() {
-        try {
-            invoke("shutdown");
-        }
-        catch (Exception e) {
-            log.warn("Unable to shutdown the server", e);
-            lastError = e;
-        }
+    public void shutdown() throws Exception {
+        invoke("shutdown");
     }
 
     //

Modified: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy?rev=636611&r1=636610&r2=636611&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy (original)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy Wed Mar 12 20:11:37 2008
@@ -39,16 +39,18 @@
         if (!connection) {
             connection = super.doExecute()
         }
-                         
-        io.out.println("Stopping Geronimo server")
-        
+                                 
         RemoteDeploymentManager deploymentManager = 
             (RemoteDeploymentManager)connection.getDeploymentManager();
         
         def server = new ServerProxy(deploymentManager.getJMXConnector())
 
-        server.shutdown();
-
-        io.out.println("Shutdown request has been issued");        
+        io.out.println("Stopping Geronimo server...");  
+        try {
+        	server.shutdown();
+        	io.out.println("Shutdown request has been issued");
+        } catch (Exception e) {
+			io.out.println("Unable to shutdown the server: " + e.getMessage());
+        }                
     }
 }