Do you need to do this in runtime? I mean, it would be really nice to have
such support directly into the container, but I believe you're going to
have to solve it by providing your EntityManagerFactoryImpl or something
like it, where you'll have to query some kind of distributed service (i.e.,
Zookeeper or roundrobin DNS) that tells your application which
hostnames/IPs/etc to configure in runtime, plus the persistence.xml info.
I've never achieved anything resembling this, but I am to believe that
someone might have already done it, especially for cloud (where hosts come
and go) oriented apps.
On Tue, Feb 4, 2014 at 2:53 PM, <forums_at_java.net> wrote:
> This solution to deploy a new app for each company is not possible,
> because I
> have limited memory in the server. I pay for a virtual machine in a ISP
> with
> 2 Gb RAM, and with just one Glassfish domain, I get to install until 10
> companies. If I will create a Glassfish domain for each one, I don't get to
> put more than 5 companies. This was the old way I had, bad to scale and
> save
> money.
>
> --
>
> [Message sent by forum member 'edilmar']
>
> View Post: http://forums.java.net/node/900946
>
>
>
--
Paulo Pires