Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The deployer tool will allow you, among other things, install and uninstall applications via a command line. In this section we will focus on just these two tasks for the sample application, this tool is fully covered in the Deployer tool section.

To deploy the HelloWorld.war sample application using the Deployer tool open a command line window and type the following command from the <geronimo_home>\bin directory:

deploy --user system --password manager deploy <app_home>\HelloWorld.war

Once deployed you should see a confirmation message similar to this one:

No Format
bgColor#000000
borderStylesolid

E:\geronimo-1.0_Jetty\bin>deploy --user system --password manager deploy ..\..\HelloWorld\HelloWorld.war
    Deployed HelloWorld @ http://hcunico:8080/hello

As a difference from the deployment via de Geronimo Administration Console, using the command line tool you receive more information in the confirmation message. For instance you receive the Component Name (a.k.a. ConfigId) and you also receive the context root where the application was deployed. This is very usefull when isntalling, testing and uninstalling several different applications where it would be hard to remember all these values.

You can also use the Deployer tool to list all the installed applications. The list-modules command allows you to list all the applications, it also lets you narrow down the query by asking for just the started or stopped applications. The list-modules command without additional parameter will list by default all the started applications.

To uninstall an application you may want to list it first to get the right Component Name (or ConfigId). Run the following command from the <geronimo_home>\bin directory:

deploy --user system --password manager list-modules

You will receive a list similar as the one shown in the following example.

No Format
bgColor#000000
borderStylesolid

E:\geronimo-1.0_Jetty\bin>deploy --user system --password manager list-modules
Found 36 modules
  + geronimo/remote-deploy-jetty/1.0/car @ http://hcunico:8080/remote-deploy
  + geronimo/ldap-demo-jetty/1.0/car @ http://hcunico:8080/ldap-demo
  + geronimo/activemq-broker/1.0/car
  + geronimo/j2ee-server/1.0/car
  + geronimo/jetty-deployer/1.0/car
  + geronimo/welcome-jetty/1.0/car @ http://hcunico:8080/
  + geronimo/ldap-realm/1.0/car
  + geronimo/uddi-jetty/1.0/car
      `-> uddi-jetty @ http://hcunico:8080/juddi
      `-> uddi-db
  + HelloWorld @ http://hcunico:8080/hello
  + user/database-pool-examples-dataSource-demoPool/1/car
  + user/database-pool-Derby_Test/1/car
  + user/database-pool-DefaultDS/1/car
  + geronimo/activemq/1.0/car
  + geronimo/directory/1.0/car
  + geronimo/j2ee-security/1.0/car
  + geronimo/j2ee-deployer/1.0/car
  + geronimo/hot-deployer/1.0/car
  + geronimo/system-database/1.0/car
  + geronimo/jmxdebug-jetty/1.0/car @ http://hcunico:8080/debug-tool
  + geronimo/j2ee-system/1.0/car
  + geronimo/jsp-examples-jetty/1.0/car @ http://hcunico:8080/jsp-examples
  + geronimo/rmi-naming/1.0/car
  + geronimo/jetty/1.0/car
  + geronimo/servlets-examples-jetty/1.0/car @ http://hcunico:8080/servlets-examples
  + geronimo/daytrader-derby-jetty/1.0/car
      `-> daytrader-web-1.0.war @ http://hcunico:8080/daytrader
      `-> daytrader-ejb-1.0.jar
      `-> daytrader-streamer-1.0.jar
      `-> daytrader-wsappclient-1.0.jar
      `-> TradeDataSource
      `-> TradeJMS
  + geronimo/geronimo-gbean-deployer/1.0/car
  + geronimo/webconsole-jetty/1.0/car
      `-> geronimo-console-standard-1.0.war @ http://hcunico:8080/console-standard
      `-> geronimo-console-framework-1.0.war @ http://hcunico:8080/console
    geronimo/client-system/1.0/car
    geronimo/j2ee-corba/1.0/car
    geronimo/daytrader-derby-jetty-streamer-client/1.0/car
    geronimo/javamail/1.0/car
    geronimo/online-deployer/1.0/car
    geronimo/client-security/1.0/car
    geronimo/client-corba/1.0/car
    geronimo/client/1.0/car
    geronimo/shutdown/1.0/car

Look for the HelloWorld entry, thas is the value you will have to use when trying to uninstall the application.

To uninstall the application run the following command from the <geronimo_home>\bin diretory using the Component Name you identified while listing the modules.

deploy --user system --password manager undeploy HelloWorld

This command will first stop the runnning application and then uninstall it. You should see a confirmation message similar to this:

No Format
bgColor#000000
borderStylesolid

E:\geronimo-1.0_Jetty\bin>deploy --user system --password manager undeploy HelloWorld
    Module HelloWorld unloaded.

    Module HelloWorld uninstalled.

    Undeployed HelloWorld

In this example you have use the same tool with three different commands:

  • deploy
  • list-modules
  • undeploy

These are not the only options and commands available for this tool, please visit the Deployer tool section for additional details.

Hot deployment

Starting and stopping application modules

...