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.
Each instance gets its own copy of the following at
- 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!
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
- Copy var to foo.
foo/var/config/config.substitutions.propertiesand change the portOffset. Try using 10, 20, 30.. etc for various instances.
We will be using
var as a template.
- To create all the instances under a directory named
servers/geronimoiand change the portOffset for each instance.
- To run ith instance set org.apache.geronimo.server.name property to servers/geronimoi.
Running An Instance
- Set the
org.apache.geronimo.server.namesystem property to the instance name before you start the server. Use the syntax
-Dorg.apache.geronimo.server.name=foofor an instance named
<geronimo_home>/foo. Add this to your
- Start the server using startup
- To shutdown this instance use the port number of RMI Naming port (default 1099)
- To deploy applications to this instance use the port number of RMI Nmaing port
The Geronimo Administration Console can also be used for all these operations. Connect to an instance by using the right HTTP port (default 8080)
The Default Instance
The default instance is nameless, i.e. it is run from
<geronimo_home>/var. It can be deleted!
The default instance named 'geronimo' will be created and run using the following. It will use
<geronimo_home>/geronimo for instance data.
Other Useful Enhancements
To use multiple repositories see: