tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Multitenants app
Date Fri, 04 Apr 2014 13:28:57 GMT
Hi

does http://tomee.apache.org/examples-trunk/dynamic-datasource-routing/README.html
help? basically give you a hook to select the datasource
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-04-04 15:17 GMT+02:00 Diego Cattelan <cattelan.diego@gmail.com>:
> Hi, I'm using TomEE 1.6 to run a simple multitenat web application.
>
> I have a global users database and each tenant has his own private database.
> After a user logins succesfully, I manually instantiate the private tenant's
> EntityManagerFactory
> with info for connecting to the right database.
>
> The application is working withouth problems. When I need an EntityManager I
> manually request it to
> the tenant's EntityManagerFactory, etc.
>
> Now, I want to use container managed transaction and injection.
>
> Requirements:
> - Tenants are created at runtime withouth container restart
>
> It's my first J2EE project so I need some hints to go in the right
> direction.
>
> How can I achieve this ? Thank you.

Mime
View raw message