@Multitenant guidelines [message #895593] |
Fri, 13 July 2012 13:28  |
Eclipse User |
|
|
|
Hi,
Could someone please help me to understand how to use @Multitenant in context of these two problems:
1) How to set orm mapping per tenant, using EMF per tenant?
2) Not using EMF per tenant, how entityManager.setProperty(MULTITENANT_PROPERTY_DEFAULT, <name>) is supposed to work in multi threading? Are EntityManager properties per thread?
3) Using EntityManager per tenant, 'drop-or-create-tables' ddl.generation droops table on every create, i.e. per tenant. Is it designed?
Thank you.
|
|
|
|
Re: @Multitenant guidelines [message #896205 is a reply to message #895956] |
Tue, 17 July 2012 10:51  |
Eclipse User |
|
|
|
Hi Chris,
Thank you for your answer, it is very clear now. Strange I did not find mysports example myself, and those pages were not so clear before.
I have further question, though, if you don't mind.
Regarding 'Multitnant' doc, 1st item in the thread, about 'Persistence Usage for Multiple Tenants'
Do you have any idea, how @PersistenceUnit and/or @PersistenceContext container managed injection can be used with multi-tenancy?
I understand one can do the following in managed bean:
@PersistenceContext(unitName = "myPU")
EntityManager em;
Though, it's not possible to make it variable.
Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.05506 seconds