Multiple data sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple data sources

Merlyn Albery-Speyer
Hi all,

I'd like to be able to take my current app and parameterise by company
- e.g. company1.myhost.com and company2.myhost.com. I'd then like to
isolate the datasources used by each company from one another. Ideally
something would intercept the incoming request and modify the
datasource used by the session and transaction manager for the
request. Has anyone on the list tried something like this already?

Cheers,
Merlyn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Multiple data sources

Andre Steingress
maybe a look at the datasources plugin implementation can give you some inspiration:

http://www.grails.org/plugin/datasources

Cheers,
Andre

Reply | Threaded
Open this post in threaded view
|

Re: Multiple data sources

tomas lin
In reply to this post by Merlyn Albery-Speyer
Multi-tenant plugin enables you to have multiple databases and
associate these by tenant.

http://www.grails.org/plugin/multi-tenant

Beware this is being refactored -
http://www.grails.org/plugin/multi-tenant-core

On Fri, Dec 3, 2010 at 6:36 AM, Merlyn Albery-Speyer
<[hidden email]> wrote:

> Hi all,
>
> I'd like to be able to take my current app and parameterise by company
> - e.g. company1.myhost.com and company2.myhost.com. I'd then like to
> isolate the datasources used by each company from one another. Ideally
> something would intercept the incoming request and modify the
> datasource used by the session and transaction manager for the
> request. Has anyone on the list tried something like this already?
>
> Cheers,
> Merlyn
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Multiple data sources

scryan
In reply to this post by Merlyn Albery-Speyer
Look at the Multi Tenant plugin which does exactly that and I am running it in production with hundreds of clients.  Let me know if you have questions.


Scott Ryan
[hidden email]

On Dec 2, 2010, at 11:36 PM, Merlyn Albery-Speyer wrote:

> Hi all,
>
> I'd like to be able to take my current app and parameterise by company
> - e.g. company1.myhost.com and company2.myhost.com. I'd then like to
> isolate the datasources used by each company from one another. Ideally
> something would intercept the incoming request and modify the
> datasource used by the session and transaction manager for the
> request. Has anyone on the list tried something like this already?
>
> Cheers,
> Merlyn
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Multiple data sources

Craig Donovan
In reply to this post by Merlyn Albery-Speyer
Merlyn -

We use the following plugin in our environment to do almost exactly what you are describing...

http://grails.org/plugin/multi-tenant-core




From: Merlyn Albery-Speyer <[hidden email]>
To: [hidden email]
Sent: Thu, December 2, 2010 11:36:49 PM
Subject: [grails-user] Multiple data sources

Hi all,

I'd like to be able to take my current app and parameterise by company
- e.g. company1.myhost.com and company2.myhost.com. I'd then like to
isolate the datasources used by each company from one another. Ideally
something would intercept the incoming request and modify the
datasource used by the session and transaction manager for the
request. Has anyone on the list tried something like this already?

Cheers,
Merlyn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Multiple data sources

Merlyn Albery-Speyer
In reply to this post by tomas lin
Great. Thanks, Tomas.

On Dec 3, 2010, at 1:16 AM, Tomas Lin wrote:

> Multi-tenant plugin enables you to have multiple databases and
> associate these by tenant.
>
> http://www.grails.org/plugin/multi-tenant


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email