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}

Excerpt

It is possible to run multiple instances of geronimo on the same machine.

Currently multiple instances of geronimo share the following directories in <geronimo_home>, the directory where you installed Geronimo.

  • bin
  • lib
  • schema
  • repository

Each instance gets its own copy of the following at <geronimo_home>/<instance_name>

  • var
  • deploy (hot deployment)

bin, lib and schema are read-only, and thus may be shared between instances. The repository is also shared, which means that an application deployed in one instance will show up in the list of deployed modules in all the other instances, but only shown running in the deployed instance.

Creating a new server instance

Start with a fresh image of geronimo. Do not use an image that has been used to run the default instance.

To create an instance named foo do the following. All your instance data will be put in <geronimo_home>/foo. All the directories named below are relative to <geronimo_home>.
Follow the procedures as below:

  1. Create a directory foo under <geronimo_home>.
  2. Copy var to foo. Starting from v2.2, you can use a GShell command deploy/new-instance to help you with this step.
  3. Edit foo/var/config/config-substitutions.properties and change the portOffset. Try using any integers such as 1, 2, 10, 20, 30.. for various instances.

Running an instance

  1. Set the org.apache.geronimo.server.name system property before you start the server. Use the syntax -Dorg.apache.geronimo.server.name=foo for an instance named foo located at <geronimo_home>/foo. Add this to your GERONIMO_OPTS environment variable
    On a Windows system: set GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=foo
    On a Unix-like system: export GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=foo
  2. Start the server using startup
    No Format
    borderStylesolid
    <geronimo_home>/bin/startup
    
  3. To shutdown this instance, use the port number of RMI Naming port (default 1099). For the new instance foo, the port number should be 1099 plus portOffset specified in foo/var/config/config-substitutions.properties.
    No Format
    borderStylesolid
    <geronimo_home>/bin/shutdown --port <port_num>
    
  4. To deploy applications to this instance use the port number of RMI Naming port
    No Format
    borderStylesolid
    <geronimo_home>/bin/deploy --port <port_num> deploy <applications>
    

The Administrative Console can also be used for all these operations. Connect to an instance by using the right HTTP port (default 8080).

Further readings

To use multiple repositories see Configuring multiple Repositories.