Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

...

There are several alternatives available for installing and removing applications:

...

Geronimo Administration Console AnchorGACGAC

To install a new application via the Geronimo Administration Console the Install New Applications portlet is available by selecting Deploy New on the Console Navigation menu on the left hand side. This portlet also allows you to start automatically the application right after it was deployed.

...

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, the remaining functionality 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:

...

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

No FormatbgColor#000000borderStylesolid D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager deploy \HelloWorld_2.0\HelloWorld.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 Deployed sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello

As a difference from the deployment via the 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. moduleId) and you also receive the context root and port where the application was deployed. This is very useful when installing, testing and uninstalling several different applications where it would be hard to remember all these values.

...

deploy --user system --password manager deploy --inplace inPlace <app_home>

The Deployer tool can also be used 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.

...

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

bgColor#000000borderStylesolid 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 + org.apache.geronimo.configs/jasper/2.1-SNAPSHOT/car + org.apache.geronimo.configs/jasper-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/javamail/2.1-SNAPSHOT/car + org.apache.geronimo.configs/jaxws-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/jaxws-ejb-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/jsr88-rar-configurer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/mejb/2.1-SNAPSHOT/car + org.apache.geronimo.configs/myfaces/2.1-SNAPSHOT/car + org.apache.geronimo.configs/myfaces-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/openejb/2.1-SNAPSHOT/car + org.apache.geronimo.configs/openejb-corba-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/openejb-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/openjpa/2.1-SNAPSHOT/car + org.apache.geronimo.configs/persistence-jpa10-deployer/2.1-SNAPSHOT/car + org.apache.geronimo.configs/remote-deploy-tomcat/2.1-SNAPSHOT/car + org.apache.geronimo.configs/sharedlib/2.1-SNAPSHOT/car + org.apache.geronimo.configs/spring/2.1-SNAPSHOT/car + org.apache.geronimo.configs/system-database/2.1-SNAPSHOT/car + org.apache.geronimo.configs/tomcat6/2.1-SNAPSHOT/car + org.apache.geronimo.configs/tomcat6-clustering-builder-wadi/2.1-SNAPSHOT/car

Look for the sample.applications/HelloWorldApp/2.0/war entry, that is the value you will have to use when trying to uninstall the application.

...

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

No FormatbgColor#000000borderStylesolid D:\geronimo-tomcat6-jee5-2.0-M2\bin>deploy --user system --password manager undeploy 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 Module sample.applications/HelloWorldApp/2.0/war unloaded. Module sample.applications/HelloWorldApp/2.0/war uninstalled. Undeployed sample.applications/HelloWorldApp/2.0/war

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

...

Note that with this deployment method you have to include the deployment plan in the application package, this method does not support external deployment plans. Also note that applications deployed via the Deployer tool or the Geronimo Administration Console will not be listed in the <geronimo_home>/deploy directory.

When you copy an application in the deploy directory, let's say HelloWorld.war, you will see a confirmation message in the console where Geronimo is running stating the application was deployed and the context to access that application.

No FormatbgColor#000000borderStylesolid 11:45:23,500 INFO [DirectoryHotDeployer] Deploying HelloWorld.war 11:45:23,953 INFO [DirectoryHotDeployer] Deployed sample.applications/HelloWorldApp/2.0/war @ http://hcunico:8080/hello

To remove the application, just delete the WAR or EAR file from the deploy directory. When the application has been removed you should see a confirmation message in the console where Geronimo is running stating the application was undeployed. No FormatbgColor

#000000borderStylesolid 11:46:17,953 INFO [DirectoryHotDeployer] Undeploying HelloWorld.war 11:46:18,281 INFO [DirectoryMonitor] Hot deployer notified that an artifact was removed: sample.applications/HelloWorldApp/2.0/war 11:46:18,281 INFO [DirectoryHotDeployer] Undeployed sample.applications/HelloWorldApp/2.0/war

Summary

In this section we has discussed three different methods for installing and uninstalling applications, one graphical, one command line and for the hot deployment you can choose command line or the GUI of your choice.
Visit the Tools and commands section for further details on the available options and parameters.