Versions Compared

Key

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

...

The geronimo command lets you perform the previous two actions, that is start and stop the server in different modes depending on the parameters you specify. This command has the following syntax:

...

Both start and stop options for this command will have the same set of parameters as the startup and shutdown commands.

startup

You can start The startup command starts the Apache Geronimo server in two different ways by running . This command has the following commandssyntax:

<geronimo_home>java -Djava.endorsed.dirs=lib/endorsed -javaagent:bin/jpa.jar -jar bin/server.jar

or simply

<geronimo_home>/bin/startup

The startup command invokes server.jar.

<options>

The available options are:In both cases this command accepts the following:

--quiet
Suppress the normal startup progress bar. This is typically used when redirecting console output to a file, or starting the server from an IDE or other tool.

...

Wiki Markup
 *\-override \[*{*}{_}configId{_}{*}*\]*
Overrides the configurations in *<geronimo_home>/var/config.xml* such that only the configurations listed on the command line will be started.  Note that many J2EE
features depend on certain configs being started, so you should be very careful what you omit.  Any arguments after *\-override* are assumed to be configuration names.

shutdown

If the The startup command starts the Apache Geronimo server, shutdown will definitively stop it. This command has the following syntax:can also be started by using the java -jar command:

java -Djava.endorsed.dirs=lib/endorsed -javaagent:bin/jpa.jar -jar bin/server.jar <options>

shutdown

The shutdown command stops the Apache Geronimo server. This command has the following syntax:

Wiki Markup
Wiki Markup
{{*<geronimo_home>/bin/shutdown \[*{*}{_}options{_}{*}*\]*}}

...

If you do not specify any parameters, this command will prompt you for a user name and password and will assume port 1099 by default and will not prompt for any port.

Deployer tool

The deployer application is a Java application that manages J2EE artifacts and GBean components in the Geronimo server. If Geronimo is running, it will connect to the server and perform its action through the server's deployment service. If it cannot find a running server, it will throw an error stating it could not connect to the server or the server is unavailable.

The deployment tool can be started by using the java -jar to invoke the main class in <geronimo_home>/bin/deployer.jar.

Typically, the deployment tool is started by just using the deploy script, but you can also run the application by starting a Java virtual machine using the following syntax:

The shutdown command can also be started by using the java -jar command:

java -Djava.endorsed.dirs=lib/endorsed -jar bin/shutdown.jar <options>

deploy

The deploy command is used for installing, uninstalling, reinstalling, starting and stopping applications and modules and for installing and uninstalling configurations (for example some configuration specific deployment plans, security realms, database connection pools etc.)

This command has the following syntax:

<geronimo_home>/bin/deploy java -jar deployer.jar <general_options> <command> <command_options>

where <general_options> specify common options that apply to all commands and control how the application behaves, <command> is a command name that specifies the action to be performed, and <command_options> are options unique to the command specified.

The deploy command can also be started by using the java -jar command:

java -Djava.endorsed.dirs=lib/endorsed -jar bin/deployer.jar <general_options> <command> <command_options>

General options

This section lists all the available general options for the Geronimo deployer tool.

...

Additionally, you can type help for further details on a given command, the syntax is as follows:

java -jar deployer.jar help <commands><geronimo_home>/bin/deploy help <command>

Back to top

Deploy

Use the deploy command to add and start a new module. The deploy command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> deploy <module> <deployment_plan>

...

To use this option you should type:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> deploy --inPlace <app_home>

...

You can also deploy applications if Geronimo is not running by using the --offline option, the syntax for this command would be:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> --offline deploy <module>

Off course, you can also combine --offline and --inPlace

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> --offline deploy --inPlace <app_home>

...

The login command has the following syntax:

java -jar deployer.jar --<geronimo_home>/bin/deploy --user <user_name> --password <password> login

So, next time you run a different command that originally required user name and password, you can run the command directly, for example:

<geronimo_home>/bin/deploy list-modules

Warning

Even when the login information is not saved in clear text, it is not secure either. If you want to save the authentication securely, you should change the .geronimo-deployer file in your home directory so that nobody else can read or write it.

...

Use the redeploy command to stop, replace and restart a module that has been deployed before. The redeploy command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> redeploy <module> <deployment_plan>

...

Use the start command to start a previously deployed module. The start command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> start <moduleIDs>

...

Use the stop command to stop a running module. The stop command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> stop <moduleIDs>

...

Use the undeploy command to stop and remove a module (running or not) and its deployment information from the server. The undeploy command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> undeploy <moduleIDs>

...

This command has the same ability as with deploy to uninstall applications when the server is not running, this command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> --offline undeploy <moduleID>

...

Use the distribute command to add a new module to the server. This command does not start the module nor mark it to be started in the future. The distribute command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> distribute <module> <deployment_plan>

Just like with the deploy command, <module> specifies the application file name and location. The <deployment_plan> specifies the file name and location of the XML with the deployment plan. Sometimes the application module already has included in the package a deployment plan or the application is so simple that does not require any deployment plan, in these cases this parameter can be omitedomitted.

A module file can be one of the following:

...

Use the list-modules command to list all available modules on the server, note that for running this command the server must be running. The list-modules command has the following syntax:

Wiki Markup
{{{*}java \-jar deployer.jar *<geronimo_home>/bin/deploy <general_options> list-modules \[--all|\--started|\--stopped\]*}}

...

Use the list-targets command to lists the targets known to the server you have connected to. The list-targets command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy <general_options> list-targets

...

Use the install-plugin command to install a Geronimo plugin previously exported from a Geronimo server or downloaded from a repository. A Geronimo plugin can be an application, a configuration such data sources and drivers or a combination. The install-plugin command has the following syntax:

java -jar deployer.jar <geronimo_home>/bin/deploy install-plugin <plugin_file>

...

Use the search-plugins command to list all the Geronimo plugins available in a Maven repository. The search-plugins command has the following syntax:

java -jar deployer.jar search-plugins <maven_repository_URL>

Back to top

deploy

The deployer tool is used for installing, uninstalling, reinstalling, starting and stopping applications and modules and for installing and uninstalling configurations (for example some configuration specific deployment plans, security realms, database connection pools etc.). Due to the number of options in this case, this tool is covered in detail in the Deployer tool section.

Info

This is a powerful tool with many parameters and options but it is not hard to use at all. Look over the Samples for additional examples.

As with the startup command, the deployment tool can also be invoked in two different ways:

Wiki Markup
{{{*}java \-jar deployer.jar \[*{*}{_}general_options{_}{*}*\] <*{*}{_}command{_}{*}*> \[*{*}{_}command_options{_}{*}*\]*}}

or simply

Wiki Markup
{{{*}deploy \[*{*}{_}general_options{_}{*}*\] <*{*}{_}command{_}{*}*> \[*{*}{_}command_options{_}{*}*\]*}}

Please refer to Deployer tool for a fully detailed description of this tool options and usage.

client.jar

following syntax:

<geronimo_home>/bin/deploy search-plugins <maven_repository_URL>

Back to top

client

The client command The client.jar launches the client application container. This command has the following syntax:

Wiki Markup
{{{*}java \-jar client.jar*<geronimo_home>/bin/client config-name \[app arg\] \[app arg\] ...*}}

The first argument identifies the Geronimo configuration that contains the application client you want to run. The rest of the arguments will be passed as arguments to the client application when it is started.

...

.

...

The jpa.jar provides the OpenJPA persistance support.

In order to get runtime enhancement you need to start the server with our jpa agent with a command line like this:

client command can also be started by using the java -jar command:

Wiki Markup
{{{*}java \-Djava.endorsed.dirs=lib/endorsed \-jar bin/client.jar config-name \[app arg\] \[app arg\] ...*}}
<geronimo_home>java -javaagent:bin/jpa.jar -jar bin/server.jar