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

Compare with Current View Page History

« Previous Version 7 Next »

Warning

This page is still under construction!

Overview

This article is organized as follows:

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 shared, i.e. an application deployed in one instance will show up in the list of deployed modules, but not running, in all the other instances!

The Default Instance 'geronimo0'

The default instance is named 'geronimo0'. It can be run using the following. It will use <geronimo_home>/geronimo0 for instance data.

<geronimo_home>/bin/startup

Creating A New Server Instance

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

  1. mkdir foo
  2. Copy var from template directory to foo. A foo/deploy directory and many others will be created automatically when the instance is started.
  3. Edit foo/var/config/config.substitutions.properties and change the portOffset (default value 0). Try using 10, 20, 30.. etc for various instances.

An Example

To create all the instances under a directory named 'servers' copy 'var' to servers/geronimoi and change the portOffset for each instance. The directory <geronimo_home> will look like this-

  1. servers/geronimo1, the instance name is servers/geronimo1
  2. servers/geronimo2, the instance name is servers/geronimo2
  3. servers/geronimo3, the instance name is servers/geronimo3
  4. .................................................................................
  5. .................................................................................

To run ith instance set org.apache.geronimo.server.name property to servers/geronimoi.

Running An Instance

  1. Set the org.apache.geronimo.server.name system property to the instance name 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

    Windows Hint

    set GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=foo

  2. Start the server using startup
    <geronimo_home>/bin/startup
    
  3. To shutdown this instance use the port number of RMI Naming port (default 1099)
    <geronimo_home>/bin/shutdown --port=<port_num>
    
  4. To deploy applications to this instance use the port number of RMI Nmaing port
    <geronimo_home>/bin/deploy -port <port_num> deploy ......
    

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

Other Useful Enhancements

To use multiple repositories see:
Multiple Repositories

  • No labels