You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


La aplicación de activación es una aplicación Java que administra artefactos J2EE y componentes GBean en el servidor Geronimo. Si Geronimo esta en ejecución, se conectará al servidor y ejecutará su acción a través el servicio de activación del servidor. Si no puede encontrar un servidor en ejecución, lanzará un error indicando que no se pudo conectar al servidor ó el servidor no esta disponible.

La herramienta de activación puede iniciarse mediante el comando java -jar para invocar la clase principal en <geronimo_home>/bin/deployer.jar.

Típicamente, la herramienta de activación se inicia con el uso del script deploy, pero también puedes ejecutarla con el inicio de una máquina virtual Java, usando la siguiente sintaxis:

java -jar deployer.jar <opciones_generales> <comando> <opciones_del_comando>

donde <opciones_generales> especifican opciones comunes que aplican a todo comando, y controlan como se comporta la aplicación, <comando> es el nombre del comando que especifica la acción a ser ejecutada, y <opciones_del_comando> son opciones únicas del comando especificado.

Opciones generales

Esta sección enlista toda opción general disponible para la herramienta de activación de Geronimo.

  • --uri <identificador>
    Donde <identificador> es un Identificador Universal de Recurso (URI, Universal Resource Identifier) que especifica el como la herramienta de activación debe contactar al servidor. Si no se establece, la herramienta intentará contactar al servidor usando al puerto estándar en localhost. El identificador debe tener la siguiente forma:
    deployer:geronimo:jmx:rmi:///jndi/rmi:[//host[:puerto]]/JMXConnector
    donde <host> se debe sustituir con el nombre del host ó la dirección TCP/IP donde se encuentra el servidor, y <puerto> se reemplaza con el número de puerto en donde el servidor se encuentra en ejecución. Si no se especifican, localhost y el puerto predeterminado serán los valores usados.

  • --host <host>
    Donde <host> es el nombre del servidor al cual intentarás activar una aplicación ó recurso. Esta opción te permite activar recursos y aplicaciones en un servidor remoto. Este parámetro es opcional y el valor predeterminado es localhost.
  • --port <puerto>
    Donde <puerto> es el puerto del servidor remoto al cual deseas activar la aplicación ó recurso. Este parámetro es opcional y el valor predeterminado es 1099.
  • --driver <directorio_del_controlador>
    Donde <directorio_del_controlador> es el directorio en donde se encuentra el JAR controlador, en caso de que desearas usar esta herramienta con un servidor distinto a Geronimo. Actualmente, valores manifest de Class-Path en dicho JAR, son ignorados.
  • --user <nombre_de_usuario>
    Donde <nombre_de_usuario> es el nombre de usuario con permisos administrativos en el servidor. Si el comando requiere autorización, debes usar esta opción.
  • --password <contraseña>
    Donde <contraseña> es la contraseña requerida para autenticar al nombre de usuario. Si no se especifica, la herramienta intentará ejecutar al comando sin contraseña, pero si el intento falla, solicitará el ingreso de la contraseña.
  • --syserr <elección>
    Donde <elección> puede ser true (verdadero) ó false (falso). Si no se especifica, se asume el valor false. Especifica true cuando desees que se haga bitácora de errores, en el dispositivo syserr.
  • --verbose <elección>
    Donde <elección> puede ser true (verdadero) ó false (falso). Si no se especifica, se asume el valor false. Especifica true cuando necesites más mensajes para determinar la causa de algún error.

Regresar a la sección superior

Commands

The available commands for the Geronimo deployer tool are listed below:

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

java -jar deployer.jar help <commands>

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 <general_options> deploy <module> <deployment_plan>

The most common <general_options> would be --user and --password. New in this release is the --inPlace option that allows you to deploy an application without copying it (as part of the deployment process itself) to the Geronimo repository. In other words, you can have an application running in Geronimo but that application may be anywhere else on the file system.

The <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 omited.

A module file can be one of the following:

  • J2EE Enterprise Application Archive (EAR) file
  • J2EE Web Application Archive (WAR) file
  • J2EE Enterprise JavaBean Archive (JAR) file
  • J2EE Java Resource Archive (RAR) file

If the server is not currently running at the time of deploying the application, the module will be marked to start next time the server is started.

Back to top

Login

Use the login command to save the username and password for the current connection to the file .geronimo-deployer in the current user's home directory. Future connections to the same server will try to use this saved authentication information instead of prompting where possible.

This information will be saved separately per connection URL, so you can specify --url or --host and/or --port on the command line to save a login to a different server.

The login command has the following syntax:

java -jar deployer.jar --user <user_name> --password <password> login

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

deploy list-modules

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.

Back to top

Redeploy

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 <general_options> redeploy <module> <deployment_plan>

Just like the deploy command, the redeploy command accepts the following modules file types:

  • J2EE Enterprise Application Archive (EAR) file
  • J2EE Web Application Archive (WAR) file
  • J2EE Enterprise JavaBean Archive (JAR) file
  • J2EE Java Resource Archive (RAR) file

Typically, both a module and a plan are specified. If the module contains a plan or if a default plan can be used, the plan can be omitted. However, if a plan is specified in this case, it overrides the other plans. If the plan references a server component already deployed in the server's environment, the module is omitted.

Back to top

Start

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

java -jar deployer.jar <general_options> start <moduleIDs>

Where <moduleIDs> is a list of one or more modules (configID) separated by blank space. The module identification (or ConfigID) is defined at deployment time in the respective deployment plan for each module previously deployed.

Back to top

Stop

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

java -jar deployer.jar <general_options> stop <moduleIDs>

Where <moduleIDs> is a list of one or more modules (configID) separated by blank space. The module identification (or ConfigID) is defined at deployment time in the respective deployment plan for each module previously deployed.

Back to top

Undeploy

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 <general_options> undeploy <moduleIDs>

Where <moduleIDs> is a list of one or more modules (configID) separated by blank space. The module identification (or ConfigID) is defined at deployment time in the respective deployment plan for each module previously deployed.

Back to top

Distribute

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 <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 omited.

A module file can be one of the following:

  • J2EE Enterprise Application Archive (EAR) file
  • J2EE Web Application Archive (WAR) file
  • J2EE Enterprise JavaBean Archive (JAR) file
  • J2EE Java Resource Archive (RAR) file

Back to top

List-modules

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

java -jar deployer.jar <general_options> list-modules [--all|--started|--stopped]

  • --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.

Back to top

List-targets

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 <general_options> list-targets

In the case of Geronimo, each configuration store is a separate target. Geronimo does not yet support clusters as targets.

Back to top

Install-plugin

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 install-plugin <plugin_file>

Back to top

Search-plugins

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

  • No labels