geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: Multiple Instances With One Repository
Date Fri, 17 Oct 2008 07:37:55 GMT

On Oct 16, 2008, at 11:56 AM, randersen wrote:

> djencks wrote:
>>> In the WASCE_HOME directory, there is the main repository and var
>>> directories, what I would like to do is to create a local
>>> repository, and
>>> start several instances that use that repository.  So I think I am
>>> after a
>>> structure like this:
>>>   repo1
>>>       instance1
>>>       instance2
>>>       instance3
>>>   repo2
>>>       instance1
>>>       instance2
>>>       instance3
>>>   repo3
>>>       instance1
>>>       instance2
>>>       instance3
>>> Is this possible?  If so, how would I do this?
>> I'm not sure why you want mutliple repositories.  I think you can do
>> what you want with only the default repository.
>> We actually have sort of a sample of multiple servers sharing a
>> repository.  One version that may be usable is at
>> To build it yourself build serve/trunk, then checkout
>> svn co
>> and build the pieces independently.
>> There's a linux script that makes a bunch of server copies (copying
>> the var directory) and a couple scripts that start the servers on
>> different ports.  This sample works on plugins so you can see plugins
>> installed on each of the "servers".  The first time a plugin is
>> installed it actually gets into the repository and the installation
>> process may unpack stuff into that server's var dir.  When the plugin
>> is installed on the other servers sharing the repo the only thing  
>> that
>> happens is the unpacking into the var dir.
>> You can do something similar with apps that you aren't thinking of as
>> plugins by deploying the app into the appropriate first server, then
>> starting the app in the other servers you want it running in.
>> Productive use of this feature is just starting so please let us know
>> what is unclear or if you run into problems or have more questions.
>> many thanks
>> david jencks
> The structure would be more like:
>    customers
>        customer1
>            customer1-repo
>            instance1
>                var
>            instance2
>                var
>        customer2
>            customer2-repo
>            instance1
>              var
> This would allow the deployment of multiple customers on 1 machine  
> that use
> different databases to use the same database pool without having to  
> deploy a
> second repository in each instance for the database pool.  Is there  
> a system
> property for the repository directory like there is for the var  
> directory?

I'd like to know more about what you are trying to do.  If each  
customer is using the same applications and the only difference  
between them is which database their copy of the app needs to connect  
to then you only need one repo.  The only reason I can think of to  
have one repo for each customer is if you have apps for one customer  
that you need to prevent being started on other customer's servers.

In the unlikely event you are using derby or another db that stores  
data inside geronimo's var dir then each customer will already get a  
new copy of derby simply because they have their own var dir.

In the more likely event you are using an external db and each  
customer has their own copy you have at least these two options:

1. use a config.xml snippet with a config-substitutions variable for  
the db name or url (and user/pw presumably) and set these in each  
server's var/config/

2. deploy a fully configured db pool on each customer's server   
pointing to the appropriate db and use artifact-aliases to have it  
replace a standard or dummy db pool.

still trying to understand what you are trying to do....
david jencks

> -- 
> View this message in context:
> Sent from the Apache Geronimo - Dev mailing list archive at  

View raw message