HomeDocumentation > Administration > Administrative tasks > Administering applications > Starting and stopping application modules
{scrollbar}

You can change the status of an application in two different ways. You can use the Deployer tool or the Geronimo Administration Console.

As mentioned before, the Deployer tool has many commands. In Installing and removing applications section we have explored mainly deploy and undeploy and very briefly list-modules. This section is going to focus on the latter command to retrieve the name of the module we want to change the status and will introduce two new commands, start and stop. Later we will discuss the use of the Geronimo Administration Console as the alternative method.

The list-module command accepts the following tree parameters:

  • --all : is used by default when no other option is specified. It will list all the available modules.
  • --started : this option will list only the modules that are running.
  • --stopped : this option will list only the modules that are not running.

You can also specify a target at the end of the command. This option is rarely used since most of the time you will have only one configuration store defined on each server. If no targets are specified, then modules on all targets will be listed, otherwise only modules on the specified targets.

This is usefull to identify the status of a particular module and the module ID itself. We will use this command to identify the HelloWorld application and change it's 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.

#000000solid D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager list-modules Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.0-M2 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.0-M2 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0-M2\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Found 47 modules + console.dbpool/LocalDB/1.0/rar + console.dbpool/jdbc%2FTradeDataSource/1.0/rar + org.apache.geronimo.configs/activemq/2.0-M2/car + org.apache.geronimo.configs/activemq-broker/2.0-M2/car + org.apache.geronimo.configs/axis/2.0-M2/car + org.apache.geronimo.configs/axis-deployer/2.0-M2/car + org.apache.geronimo.configs/axis2/2.0-M2/car + org.apache.geronimo.configs/axis2-deployer/2.0-M2/car + org.apache.geronimo.configs/client-deployer/2.0-M2/car + org.apache.geronimo.configs/connector-deployer/2.0-M2/car + org.apache.geronimo.configs/cxf/2.0-M2/car + org.apache.geronimo.configs/cxf-deployer/2.0-M2/car + org.apache.geronimo.configs/dojo-tomcat/2.0-M2/car @ http://hcunico:8080/dojo + org.apache.geronimo.configs/geronimo-gbean-deployer/2.0-M2/car + org.apache.geronimo.configs/hot-deployer/2.0-M2/car + org.apache.geronimo.configs/j2ee-deployer/2.0-M2/car + org.apache.geronimo.configs/j2ee-security/2.0-M2/car + org.apache.geronimo.configs/j2ee-server/2.0-M2/car + org.apache.geronimo.configs/j2ee-system/2.0-M2/car + org.apache.geronimo.configs/javamail/2.0-M2/car + org.apache.geronimo.configs/jee-specs/2.0-M2/car + org.apache.geronimo.configs/openejb/2.0-M2/car + org.apache.geronimo.configs/openejb-deployer/2.0-M2/car + org.apache.geronimo.configs/persistence-jpa10-deployer/2.0-M2/car + org.apache.geronimo.configs/remote-deploy-tomcat/2.0-M2/car @ http://hcunico:8080/remote-deploy + org.apache.geronimo.configs/rmi-naming/2.0-M2/car + org.apache.geronimo.configs/sharedlib/2.0-M2/car + org.apache.geronimo.configs/system-database/2.0-M2/car + org.apache.geronimo.configs/tomcat6/2.0-M2/car + org.apache.geronimo.configs/tomcat6-deployer/2.0-M2/car + org.apache.geronimo.configs/transaction-jta11/2.0-M2/car + org.apache.geronimo.configs/webconsole-tomcat/2.0-M2/car `-> standard.war @ http://hcunico:8080/console-standard `-> framework.war @ http://hcunico:8080/console + org.apache.geronimo.configs/webservices-common/2.0-M2/car + org.apache.geronimo.configs/welcome-tomcat/2.0-M2/car @ http://hcunico:8080/ + sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello org.apache.geronimo.configs/ca-helper-tomcat/2.0-M2/car org.apache.geronimo.configs/client/2.0-M2/car org.apache.geronimo.configs/client-security/2.0-M2/car org.apache.geronimo.configs/client-system/2.0-M2/car org.apache.geronimo.configs/client-transaction/2.0-M2/car org.apache.geronimo.configs/directory/2.0-M2/car org.apache.geronimo.configs/ldap-realm/2.0-M2/car org.apache.geronimo.configs/online-deployer/2.0-M2/car org.apache.geronimo.configs/openjpa/2.0-M2/car org.apache.geronimo.configs/shutdown/2.0-M2/car org.apache.geronimo.configs/transformer-agent/2.0-M2/car org.apache.geronimo.configs/uddi-tomcat/2.0-M2/car

Our taget now is " + sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello " , this module's status is started since there is a + on the left. Alternatively, you can run the following command to list just 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 one listed below indicating that the module has been stopped.

#000000solid 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.0-M2 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.0-M2 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0-M2\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 now see added to the list the sample.applications/HelloWorldApp/2.0/war module. See the command and results in the following example.

#000000solid D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager list-modules --stopped Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.0-M2 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.0-M2 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0-M2\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Found 15 modules org.apache.geronimo.configs/axis2/2.0-M2/car org.apache.geronimo.configs/ca-helper-tomcat/2.0-M2/car org.apache.geronimo.configs/client/2.0-M2/car org.apache.geronimo.configs/client-security/2.0-M2/car org.apache.geronimo.configs/client-system/2.0-M2/car org.apache.geronimo.configs/client-transaction/2.0-M2/car org.apache.geronimo.configs/cxf/2.0-M2/car org.apache.geronimo.configs/directory/2.0-M2/car org.apache.geronimo.configs/ldap-realm/2.0-M2/car org.apache.geronimo.configs/online-deployer/2.0-M2/car org.apache.geronimo.configs/openjpa/2.0-M2/car org.apache.geronimo.configs/shutdown/2.0-M2/car org.apache.geronimo.configs/transformer-agent/2.0-M2/car org.apache.geronimo.configs/uddi-tomcat/2.0-M2/car sample.applications/HelloWorldApp/2.0/war

To start the modules just use start instead of stop.

deploy --user system --password manager start sample.applications/HelloWorldApp/2.0/war

You will receive a confirmation message similar to the one listed below indicating that the module has been started.

#000000solid 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.0-M2 Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.0-M2 Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0-M2\var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre Started sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello

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 hand side. There you will find Application EARs and Web App WARs, depending on the type of application you want to change the status, you will choose either Application EARs or Web App WARs. For this example we continue to use HelloWorld.war as the sample application, hence we will select Web App WARs.

We used this portlet in the Installing and removing applications section to install and remove applications via the Geronimo Administration Console. From this same portlet you can also change the status of the applications. The available commands within the portlet will change depending on the status for each application. If the application is in running status (started), the commands Stop and Restart will be displayed. If the application is stopped, only the command Start will be displayed. The Uninstall command will always be displayed independently of the status of the application. To change the status of the application just click on the command (Start or Stop).