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

Compare with Current View Page History

« Previous Version 15 Next »

A server instance is easy to create in Geronimo:

  1. Set the org.apache.geronimo.server.name property to the instance name before you start the server.
    • Use the syntax -Dorg.apache.geronimo.server.name=foo to name your instance foo. There are two ways to do this:
      1. Add this to your GERONIMO_OPTS environment variable, or
      2. Pass it on the java command-line invocation of the server.
    • This server's var and deploy directory should then be under <geronimo_home>/foo.
    • org.apache.geronimo.server.name may be any pathname relative to (descending from) <geronimo_home>. For example, servers/bar would put the server's var directory under <geronimo_home>/servers/bar.
    • The org.apache.geronimo.server.dir system property may also be used, and it overrides org.apache.geronimo.server.name.
    • Use org.apache.geronimo.server.dir to specify an absolute path, which can not be relative to <geronimo_home>. For example, /ag20/servers/bar would put the server's var directory under /ag20/servers/bar. Otherwise, the two system properties behave the same.
  2. mkdir foo
  3. Copy var/* to foo/var/ or using gshell command deploy/newinstance foo
  4. Edit foo/var/config/config-substitutions.properties, change PortOffset to an integer value like 10,20,30,40,... so that the ports in the new server instance will not conflict with existing server instances you already have defined and/or started. (Alternatively start the server with the property -Dorg.apache.geronimo.config.substitution.PortOffset=3 in the command line)
  5. Start the server.

To deploy applications to the new server instance, you need to specify the NamingPort+PortOffset used, such as for PortOffset=1:

  • deploy -port 1100 list-modules
  • No labels