Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

The advantage of having multiple repositories is that they can reside on different server instances.

You can create multiple repositories on different server instances, deploy a single repository on a single server instance, and deploy applications on multiple repositories on a single server instance.

This document is organized into topic includes the following sectionsinformation:

Table of Contents

As an alternative to the steps provided in this section, there is a server-repo plugin is available that can to perform this configuration for you. Visit the Samples section for further details.

...

  1. List the targets on the current server via the command: deploy(.bat|.sh) list-targets, and you can see the following information:
    No Format
    Available Targets:
    org.example.configs/myrepo/2.2/car?ServiceModule=org.example.configs/myrepo/2.2/car,j2eeType=ConfigurationStore,name=Local2
    org.apache.geronimo.configs/j2ee-system/2.2/car?ServiceModule=org.apache.geronimo.configs/j2ee-system/2.2/car,j2eeType=ConfigurationStore,name=Local
    
  2. Set the environment variable REPO2:
    On a Windows system set REPO2=org.example.configs/myrepo/2.2/car?ServiceModule=org.example.configs/myrepo/2.2/car,j2eeType=ConfigurationStore,name=Local2
    On a non-Windows system export REPO2=org.example.configs/myrepo/2.2/car?ServiceModule=org.example.configs/myrepo/2.2/car,j2eeType=ConfigurationStore,name=Local2
  3. Deploy the application to the repository repo2 via with the following deploy (.bat or .sh) command:
    On a Windows system deploy.bat deploy --targets %REPO2% <SAMPLE_HOME>/applications/geronimo-jsp-examples/target/geronimo-jsp-examples-2.2.war
    On a non-Windows system deploy.sh deploy --targets $REPO2 <SAMPLE_HOME>/applications/geronimo-jsp-examples/target/geronimo-jsp-examples-2.2.war
    where <SAMPLE_HOME> is the directory of your samples. Then, the jsp example is deployed to the new repository repo2. The following message is displayed:
    No Format
    Deployed
    org.apache.geronimo.applications.examples/geronimo-jsp-examples/2.2/war
    @ /jsp-examples
  4. Access the application via at http://host:port/jsp-examples.

...

Creating multiple repositories on multiple server instances

You first need to create Create several server instances, and start the server instances. For information about creating server instances, see Running multiple Geronimo instances. Then you need to create several repositories on these server instances. You can test the repositories by deploying an application to it these server instances and undeploying the application from themthese server instances.

Creating a repository for server instance2

After you create more than one server instance, you can create repositories and deploy the repositories to different server instances. For information about how to create and deploy a repository on a server instance, for example, create see the following example that creates repo22 and deploy deploys it on server2.:

  1. Create a directory repo22 under <geronimo_home>, for example, <geronimo_home>/repo22.
  2. Create a file repo22.xml under the <geronimo_home>/repo22 directory. For detailed information about the file, see creating multiple repositories.
  3. Deploy the repo22.xml by running the following command from the command prompt:
    deploy(.bat|.sh) -port instance2_RMI_port deploy <geronimo_home>/server2/repo22/repo22.xml

...

  1. Set the environment variable repo22 for the repository repo22 that you have previously created.
  2. Deploy the application to the repository repo2 via with the following deploy (.bat or .sh) command:
    On a Windows system deploy.bat -port instance2_RMI_port deploy --targets %repo22% <SAMPLE_HOME>/applications/geronimo-jsp-examples/target/geronimo-jsp-examples-2.2.war
    On a non-Windows system deploy.sh -port instance2_RMI_port deploy --targets $repo22 <SAMPLE_HOME>/applications/geronimo-jsp-examples/target/geronimo-jsp-examples-2.2.war
  3. Undeploy the jsp application from repo22 repository via with the following command:
    On a Windows system deploy.bat -port instance2_RMI_port undeploy %repo22%|org.apache.geronimo.applications.examples/geronimo-jsp-examples/2.2/war
    On a non-Windows system deploy.sh -port instance2_RMI_port undeploy $repo22|org.apache.geronimo.applications.examples/geronimo-jsp-examples/2.2/war

...