geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r580864 - in /geronimo/server/trunk: assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/ modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/
Date Mon, 01 Oct 2007 06:47:41 GMT
Author: jdillon
Date: Sun Sep 30 23:47:39 2007
New Revision: 580864

URL: http://svn.apache.org/viewvc?rev=580864&view=rev
Log:
Adding stop-server command

Added:
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server
      - copied, changed from r580841, geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
      - copied, changed from r580841, geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat
    geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
  (with props)
Modified:
    geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy

Copied: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server
(from r580841, geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server?p2=geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server&p1=geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server&r1=580841&r2=580864&rev=580864&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server
Sun Sep 30 23:47:39 2007
@@ -24,5 +24,5 @@
 
 DIRNAME=`dirname "$0"`
 
-exec "$DIRNAME/gsh" -c "start-server" "$@"
+exec "$DIRNAME/gsh" -c "stop-server" "$@"
 

Copied: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
(from r580841, geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat?p2=geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat&p1=geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat&r1=580841&r2=580864&rev=580864&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/start-server.bat
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/stop-server.bat
Sun Sep 30 23:47:39 2007
@@ -29,7 +29,7 @@
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
 
-"%DIRNAME%\gsh.bat" -c "start-server" %*
+"%DIRNAME%\gsh.bat" -c "stop-server" %*
 
 :end
 

Modified: geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy?rev=580864&r1=580863&r2=580864&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
(original)
+++ geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartServerCommand.groovy
Sun Sep 30 23:47:39 2007
@@ -33,7 +33,7 @@
 /**
  * Starts a new Geronimo server instance.
  *
- * @version $Id$
+ * @version $Rev$ $Date$
  */
 @CommandComponent(id='start-server')
 class StartServerCommand

Added: geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy?rev=580864&view=auto
==============================================================================
--- geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
(added)
+++ geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
Sun Sep 30 23:47:39 2007
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.commands
+
+import org.apache.geronimo.gshell.command.annotation.CommandComponent
+import org.apache.geronimo.gshell.command.CommandSupport
+
+/**
+ * Stops a running Geronimo server instance.
+ *
+ * @version $Rev$ $Date$
+ */
+@CommandComponent(id='stop-server')
+class StopServerCommand
+    extends CommandSupport
+{
+    //
+    // TODO: Expose as options, maybe expose a single URI-ish thingy?
+    //
+
+    String hostname = 'localhost'
+
+    int port = 1099
+
+    String username = 'system'
+
+    String password = 'manager'
+    
+    protected Object doExecute() throws Exception {
+        io.out.println("Stopping Geronimo server: ${hostname}:${port}")
+
+        def server = new ServerProxy(hostname, port, username, password)
+
+        server.shutdown();
+
+        io.out.println("Shutdown request has been issued");
+    }
+}
\ No newline at end of file

Propchange: geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/server/trunk/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopServerCommand.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message