geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r636614 - in /geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands: ServerProxy.java StopServerCommand.groovy
Date Thu, 13 Mar 2008 03:15:53 GMT
Author: gawor
Date: Wed Mar 12 20:15:52 2008
New Revision: 636614

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

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

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java?rev=636614&r1=636613&r2=636614&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/ServerProxy.java
Wed Mar 12 20:15:52 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/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy?rev=636614&r1=636613&r2=636614&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
Wed Mar 12 20:15:52 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());
+        }                
     }
 }



Mime
View raw message