geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r602253 - in /geronimo/server/trunk: assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/ framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/
Date Fri, 07 Dec 2007 22:35:35 GMT
Author: gawor
Date: Fri Dec  7 14:35:34 2007
New Revision: 602253

URL: http://svn.apache.org/viewvc?rev=602253&view=rev
Log:
gshell commands for start, stop, undeploy, and restart module commands

Added:
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RestartModuleCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartModuleCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopModuleCommand.groovy
    geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UndeployModuleCommand.groovy
Modified:
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/layout.xml

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/layout.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/layout.xml?rev=602253&r1=602252&r2=602253&view=diff
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/layout.xml
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/underlay/etc/layout.xml
Fri Dec  7 14:35:34 2007
@@ -165,6 +165,26 @@
                     <name>assemble</name>
                     <id>geronimo-commands:assemble-server</id>
                 </command>
+
+                <command>
+                    <name>stop</name>
+                    <id>geronimo-commands:stop-module</id>
+                </command>
+
+                <command>
+                    <name>start</name>
+                    <id>geronimo-commands:start-module</id>
+                </command>
+
+                <command>
+                    <name>restart</name>
+                    <id>geronimo-commands:restart-module</id>
+                </command>
+
+                <command>
+                    <name>undeploy</name>
+                    <id>geronimo-commands:undeploy-module</id>
+                </command>
             </nodes>
         </group>
 

Added: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RestartModuleCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RestartModuleCommand.groovy?rev=602253&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RestartModuleCommand.groovy
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/RestartModuleCommand.groovy
Fri Dec  7 14:35:34 2007
@@ -0,0 +1,52 @@
+/*
+ * 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 jline.ConsoleReader
+
+import org.apache.geronimo.gshell.clp.Argument
+import org.apache.geronimo.gshell.command.annotation.CommandComponent
+import org.apache.geronimo.cli.deployer.BaseCommandArgs
+import org.apache.geronimo.deployment.cli.CommandRestart
+
+/**
+ * Restart module.
+ *
+ * @version $Rev: 580864 $ $Date: 2007-09-30 23:47:39 -0700 (Sun, 30 Sep 2007) $
+ */
+@CommandComponent(id='geronimo-commands:restart-module', description="Restart a module")
+class RestartModuleCommand extends ConnectCommand {
+     
+    @Argument(metaVar="MODULE_ID", required=true, description="Module name")
+    List<String> moduleNames = []
+
+    protected Object doExecute() throws Exception {
+        def connection = variables.get("ServerConnection")
+        if (!connection) {
+            connection = super.doExecute()
+        }
+        
+        def command = new CommandRestart()
+        def consoleReader = new ConsoleReader(io.inputStream, io.out)
+        def args = new BaseCommandArgs( (String[])moduleNames )
+        
+        command.execute(consoleReader, connection, args)
+    }
+}
\ No newline at end of file

Added: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartModuleCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartModuleCommand.groovy?rev=602253&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartModuleCommand.groovy
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StartModuleCommand.groovy
Fri Dec  7 14:35:34 2007
@@ -0,0 +1,52 @@
+/*
+ * 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 jline.ConsoleReader
+
+import org.apache.geronimo.gshell.clp.Argument
+import org.apache.geronimo.gshell.command.annotation.CommandComponent
+import org.apache.geronimo.cli.deployer.BaseCommandArgs
+import org.apache.geronimo.deployment.cli.CommandStart
+
+/**
+ * Start module.
+ *
+ * @version $Rev: 580864 $ $Date: 2007-09-30 23:47:39 -0700 (Sun, 30 Sep 2007) $
+ */
+@CommandComponent(id='geronimo-commands:start-module', description="Start a module")
+class StartModuleCommand extends ConnectCommand {
+     
+    @Argument(metaVar="MODULE_ID", required=true, description="Module name")
+    List<String> moduleNames = []
+
+    protected Object doExecute() throws Exception {
+        def connection = variables.get("ServerConnection")
+        if (!connection) {
+            connection = super.doExecute()
+        }
+        
+        def command = new CommandStart()
+        def consoleReader = new ConsoleReader(io.inputStream, io.out)
+        def args = new BaseCommandArgs( (String[])moduleNames )
+        
+        command.execute(consoleReader, connection, args)
+    }
+}
\ No newline at end of file

Added: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopModuleCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopModuleCommand.groovy?rev=602253&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopModuleCommand.groovy
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/StopModuleCommand.groovy
Fri Dec  7 14:35:34 2007
@@ -0,0 +1,52 @@
+/*
+ * 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 jline.ConsoleReader
+
+import org.apache.geronimo.gshell.clp.Argument
+import org.apache.geronimo.gshell.command.annotation.CommandComponent
+import org.apache.geronimo.cli.deployer.BaseCommandArgs
+import org.apache.geronimo.deployment.cli.CommandStop
+
+/**
+ * Stop module.
+ *
+ * @version $Rev: 580864 $ $Date: 2007-09-30 23:47:39 -0700 (Sun, 30 Sep 2007) $
+ */
+@CommandComponent(id='geronimo-commands:stop-module', description="Stop a module")
+class StopModuleCommand extends ConnectCommand {
+     
+    @Argument(metaVar="MODULE_ID", required=true, description="Module name")
+    List<String> moduleNames = []
+
+    protected Object doExecute() throws Exception {
+        def connection = variables.get("ServerConnection")
+        if (!connection) {
+            connection = super.doExecute()
+        }
+        
+        def command = new CommandStop()
+        def consoleReader = new ConsoleReader(io.inputStream, io.out)
+        def args = new BaseCommandArgs( (String[])moduleNames )
+        
+        command.execute(consoleReader, connection, args)
+    }
+}
\ No newline at end of file

Added: geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UndeployModuleCommand.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UndeployModuleCommand.groovy?rev=602253&view=auto
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UndeployModuleCommand.groovy
(added)
+++ geronimo/server/trunk/framework/modules/geronimo-commands/src/main/groovy/org/apache/geronimo/commands/UndeployModuleCommand.groovy
Fri Dec  7 14:35:34 2007
@@ -0,0 +1,52 @@
+/*
+ * 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 jline.ConsoleReader
+
+import org.apache.geronimo.gshell.clp.Argument
+import org.apache.geronimo.gshell.command.annotation.CommandComponent
+import org.apache.geronimo.cli.deployer.BaseCommandArgs
+import org.apache.geronimo.deployment.cli.CommandUndeploy
+
+/**
+ * Undeploy module.
+ *
+ * @version $Rev: 580864 $ $Date: 2007-09-30 23:47:39 -0700 (Sun, 30 Sep 2007) $
+ */
+@CommandComponent(id='geronimo-commands:undeploy-module', description="Undeploy a module")
+class UndeployModuleCommand extends ConnectCommand {
+     
+    @Argument(metaVar="MODULE_ID", required=true, description="Module name")
+    List<String> moduleNames = []
+
+    protected Object doExecute() throws Exception {
+        def connection = variables.get("ServerConnection")
+        if (!connection) {
+            connection = super.doExecute()
+        }
+        
+        def command = new CommandUndeploy()
+        def consoleReader = new ConsoleReader(io.inputStream, io.out)
+        def args = new BaseCommandArgs( (String[])moduleNames )
+        
+        command.execute(consoleReader, connection, args)
+    }
+}
\ No newline at end of file



Mime
View raw message