From scm-return-45393-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Mon Jan 24 09:41:24 2011 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 46096 invoked from network); 24 Jan 2011 09:41:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 09:41:23 -0000 Received: (qmail 93508 invoked by uid 500); 24 Jan 2011 09:41:23 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 93452 invoked by uid 500); 24 Jan 2011 09:41:22 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 93445 invoked by uid 99); 24 Jan 2011 09:41:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 09:41:22 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=10.0 tests=ALL_TRUSTED,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MIME_HTML_ONLY X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 09:41:20 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0O9f0iZ006528 for ; Mon, 24 Jan 2011 09:41:00 GMT Date: Mon, 24 Jan 2011 04:41:00 -0500 (EST) From: confluence@apache.org To: scm@geronimo.apache.org Message-ID: <18489138.1735.1295862060024.JavaMail.root@thor> Subject: [CONF] Apache Geronimo v3.0 > Starting and stopping applications MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated

Starting and stopping applications

Page edited by maojia


Changes (20)

=20 =20
=20 =20
...
h1. Via Geronimo Administrati= on Console

As an alternative to the = command line option, you can use th= e 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<= /span> side. Depending on the type of application that you want to change the= status, you will status of, choose ei= ther *Application EARs* or *Web App WARs*. For this example, we continue to use {{HelloWorld.war}} as the sample application, hence we will selec= t *Web App WARs*.

!adminapps.gif!
We used this portlet in the = [Deploying and undeploying applications] section to install and remove appl= ications via the Geronimo Administration Console. From this same portlet yo= u can also change the status of the applications. The available commands wi= thin the portlet will change depending on the status for each application. = If the application is in *running* status (started), the commands *Stop* an= d *Restart* will be displayed. If the application is *stopped*, only the co= mmand *Start* will be displayed. The *Uninstall* command will always be dis= played independently of the status of the application. To change the status= of the application just click on the command (Start or Stop).
We used this portlet in the [Deploying and undeploying applications] = section to install and remove applications by using the Geronimo Administra= tion 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* stat= us (started), the commands *Stop* and *Restart* are displayed. If the appli= cation 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= ).


h1. Via Deployer to= ol

The [Deployer tool|deploy] h= as many commands. In [Deploying and undeploying applications] section we ha= ve 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 comma= nds, *start* and *stop*. Later we will discuss the use of the Geronimo Admi= nistration Console as the alternative method.
The [Deployer tool|deploy] has many commands. In the [Deploying and u= ndeploying applications] section, we have explored mainly *deploy* and *und= eploy*, 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* comman= d accepts the following tree parameters:

* *--all* : is used by de= fault when no other option is specified. It will list lists all the available modules.
* *--started* : this opti= on will list lists only the modules th= at are running.
* *--stopped* : this opti= on will list lists only the modules th= at are not running.

You can also specify a _targ= et_ 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, othe= rwise only modules on the specified targets.
You can also specify a _target_ at the end of the command. This optio= n is rarely used because most of the time you have only one configuration s= tore defined on each server. Only modules on the specified targets are list= ed. If no targets are specified, then modules on all targets are listed.

This *list-module* command = is useful to identify for identifying = the status of a particular module and the module ID itself. We will you can use this command to identify the *Hel= loWorld* application and change its status.

From a command line wind= ow run the following command from the {{<geronimo_home>\bin}} directo= ry to list all the modules:
...
{noformat}{color}

Our target now is " *{{= + sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello}}* = ". This module's status is *started* since there is a *+* on the l= eft. Alternatively, you can run the following command to list just the star= ted modules:
Find the " *{{+ sample.applications/HelloWorldApp/2.0/war @ http= ://hcunico:8080/hello}}* " module. The status of this module is *start= ed*, because there is a *+* on the left. Alternatively, you can run the fol= lowing command to list only the started modules:

*{{deploy --user system = --password manager list-modules --started}}*

To stop the " *{{sam= ple.applications/HelloWorldApp/2.0/war}}* module,= type the following command:

*{{deploy --user system = --password manager stop sample.applications/HelloWorldApp/2.0/war}}*
<= br>
You will receive a confir= mation message similar to the one listed be= low
{color:white}{noformat:b= orderStyle=3Dsolid| bgColor=3D#000000}
...
{noformat}{color}

When you list all the stoppe= d modules you should now see added to the list the *{{sample.applications/H= elloWorldApp/2.0/war}}* module. See the command and results in the followin= g example.
When you list all the stopped modules, you should see the *{{sample.a= pplications/HelloWorldApp/2.0/war}}* module added to the list. See the comm= and and results in the following example.

{color:white}{noformat:b= orderStyle=3Dsolid| bgColor=3D#000000}
...
{noformat}{color}

To start the modules just us= e *start* instead of stop.
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 confir= mation message similar to the one listed be= low
{color:white}{noformat:b= orderStyle=3Dsolid| bgColor=3D#000000}
...

Full Content

There are several alternatives available for starting and stopping appli= cations:

Via Geronimo Administration Console

As an alternative to the command line option, you can use the Geronimo A= dministration Console to change the status of the modules. Open the Geronim= o Administration Console and navigate to Applications on the Cons= ole Navigation menu on the left side. Depending on the type of applicat= ion that you want to change the status of, choose either Application EAR= s or Web App WARs. For this example, we use HelloWorld.war<= /tt> as the sample application, hence we will select Web App WARs.

We used this portlet in the Deploying and undeploying applications section to install an= d remove applications by using the Geronimo Administration Console. From th= is same portlet, you can also change the status of the applications. The av= ailable commands within the portlet changes depending on the status for eac= h application. If the application is in running status (started), th= e commands Stop and Restart are displayed. If the application= is stopped, only the command Start is displayed. The Unin= stall command is always displayed independently of the status of the ap= plication. To change the status of the application, click the command (Star= t or Stop).

Via Dep= loyer tool

The De= ployer tool has many commands. In the Deploying and undeploying applications section, w= e have explored mainly deploy and undeploy, and very briefly = list-modules. This section focuses on the list-modules comman= d 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:

    =09
  • --all : is used by default when no other option is specified.= It lists all the available modules.
  • =09
  • --started : this option lists only the modules that are runni= ng.
  • =09
  • --stopped : this option lists only the modules that are not r= unning.

You can also specify a target at the end of the command. This o= ption is rarely used because most of the time you have only one configurati= on 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 i= dentify the HelloWorld application and change its status.

From a command line window run the following command from the <ge= ronimo_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 @ htt= p://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, in= dicating 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 t= he 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 comm= and.

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

You will receive a confirmation message similar to the following one, in= dicating 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

Via GShell

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 applicatio= n, and deploy/restart is used to resta= rt a started or stopped application. See Geronim= o GShell Commands for more information about these commands and their o= ptions.