Home > Documentation > Configuring and administering > Deploying and administering assets in Geronimo > Deploying and administering applications > Starting and stopping applications |
There are several alternatives available for starting and stopping applications:
As an alternative to the command line option, you can use the Geronimo Administration Console to change the status of the modules. Open the Geronimo Administration Console and navigate to Applications on the Console Navigation menu on the left side. Depending on the type of application that you want to change the status of, choose either Application EARs or Web App WARs. For this example, we use HelloWorld.war
as the sample application, hence we will select Web App WARs.
We used this portlet in the Deploying and undeploying applications section to install and remove applications by using the Geronimo Administration Console. From this same portlet, you can also change the status of the applications. The available commands within the portlet changes depending on the status for each application. If the application is in running status (started), the commands Stop and Restart are displayed. If the application is stopped, only the command Start is displayed. The Uninstall command is always displayed independently of the status of the application. To change the status of the application, click the command (Start or Stop).
The Deployer tool has many commands. In the Deploying and undeploying applications section, we have explored mainly deploy and undeploy, and very briefly list-modules. This section focuses on the list-modules command to retrieve the name of the module that you want to change the status of. This section also introduces two new commands, start and stop.
The list-module command accepts the following tree parameters:
You can also specify a target at the end of the command. This option is rarely used because most of the time you have only one configuration store defined on each server. Only modules on the specified targets are listed. If no targets are specified, then modules on all targets are listed.
This list-module command is useful for identifying the status of a particular module and the module ID itself. you can use this command to identify the HelloWorld application and change its status.
From a command line window run the following command from the <geronimo_home>\bin
directory to list all the modules:
deploy --user system --password manager list-modules
You will receive a list of all the modules installed on the server. Note that the started modules are differentiated by a + sign on the left and are displayed first in the list.
D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager list-modules Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.1\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Found 85 modules + org.apache.geronimo.configs/activemq-broker/2.1-SNAPSHOT/car + org.apache.geronimo.configs/activemq-ra/2.1-SNAPSHOT/car + org.apache.geronimo.configs/axis/2.1-SNAPSHOT/car + org.apache.geronimo.configs/axis-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/axis2/2.1-SNAPSHOT/car + org.apache.geronimo.configs/axis2-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/axis2-ejb/2.1-SNAPSHOT/car + org.apache.geronimo.configs/axis2-ejb-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/ca-helper-tomcat/2.1-SNAPSHOT/car + org.apache.geronimo.configs/client-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/clustering/2.1-SNAPSHOT/car + org.apache.geronimo.configs/connector-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/cxf/2.1-SNAPSHOT/car + org.apache.geronimo.configs/cxf-ejb/2.1-SNAPSHOT/car + org.apache.geronimo.configs/dojo-legacy-tomcat/2.1-SNAPSHOT/car + org.apache.geronimo.configs/dojo-tomcat/2.1-SNAPSHOT/car + org.apache.geronimo.configs/hot-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/j2ee-corba-yoko/2.1-SNAPSHOT/car + org.apache.geronimo.configs/j2ee-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/j2ee-server/2.1-SNAPSHOT/car
Find the " + sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello
" module. The status of this module is started, because there is a + on the left. Alternatively, you can run the following command to list only the started modules:
deploy --user system --password manager list-modules --started
To stop the " sample.applications/HelloWorldApp/2.0/war
module, type the following command:
deploy --user system --password manager stop sample.applications/HelloWorldApp/2.0/war
You will receive a confirmation message similar to the following one, indicating that the module has been stopped.
D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager stop sample.applications/HelloWorldApp/2.0/war Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.1\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Stopped sample.applications/HelloWorldApp/2.0/war
When you list all the stopped modules, you should see the sample.applications/HelloWorldApp/2.0/war
module added to the list. See the command and results in the following example.
D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager list-modules --stopped Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.1\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Found 20 modules org.apache.geronimo.configs/client/2.1-SNAPSHOT/car org.apache.geronimo.configs/client-corba-yoko/2.1-SNAPSHOT/car org.apache.geronimo.configs/client-security/2.1-SNAPSHOT/car org.apache.geronimo.configs/client-transaction/2.1-SNAPSHOT/car org.apache.geronimo.configs/cxf-deployer/2.1-SNAPSHOT/car org.apache.geronimo.configs/cxf-ejb-deployer/2.1-SNAPSHOT/car org.apache.geronimo.configs/farming/2.1-SNAPSHOT/car org.apache.geronimo.configs/jsr88-ear-configurer/2.1-SNAPSHOT/car org.apache.geronimo.configs/jsr88-jar-configurer/2.1-SNAPSHOT/car org.apache.geronimo.configs/jsr88-war-configurer/2.1-SNAPSHOT/car org.apache.geronimo.configs/tomcat6-clustering-wadi/2.1-SNAPSHOT/car org.apache.geronimo.configs/wadi-clustering/2.1-SNAPSHOT/car org.apache.geronimo.framework/client-system/2.1-SNAPSHOT/car org.apache.geronimo.framework/jsr88-cli/2.1-SNAPSHOT/car org.apache.geronimo.framework/jsr88-deploymentfactory/2.1-SNAPSHOT/car org.apache.geronimo.framework/offline-deployer/2.1-SNAPSHOT/car org.apache.geronimo.framework/online-deployer/2.1-SNAPSHOT/car org.apache.geronimo.framework/shutdown/2.1-SNAPSHOT/car org.apache.geronimo.framework/upgrade-cli/2.1-SNAPSHOT/car sample.applications/HelloWorldApp/2.0/war
To start the module, use start instead of stop in the command.
deploy --user system --password manager start sample.applications/HelloWorldApp/2.0/war
You will receive a confirmation message similar to the following one, indicating that the module has been started.
D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager start sample.applications/HelloWorldApp/2.0/war Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.1 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.1\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Started sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello
You can also use GShell deploy/start commands to manage the status of an application. Similarly, deploy/stop can be used to stop the running application, and deploy/restart is used to restart a started or stopped application. See Geronimo GShell Commands for more information about these commands and their options.
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |