Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Multitenancy and Entity Manager(Multitenancy)
Multitenancy and Entity Manager [message #1075846] Tue, 30 July 2013 03:28 Go to next message
Deepthi Umakanth is currently offline Deepthi Umakanth
Messages: 2
Registered: July 2013
Junior Member
We are using JPA with eclipse link. We have extensive JPA queries. Our code is in production for a while. Now we have a business use case, to support multitenancy.

We will be using the Oracle Pluggable Database mechanism where each client will have their database.

In our code, in order to create an EntityManager, we have defined a Singleton Class.

In places where we do any JPA queries, we fetch the EntityManager object from this Singleton Class and store the instance of EntityManager as a static variable and reuse in our code.



In multitenant use case, will the EntityManager instance be specific to the database of each of the client?

My doubt is do we need to change our model of preparing the EntityManager and instantiate the EntityManager at class level or the current model works without any issues?
Re: Multitenancy and Entity Manager [message #1076096 is a reply to message #1075846] Tue, 30 July 2013 13:50 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3120
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 7/30/2013 11:12 AM, Deepthi Umakanth wrote:
> We are using JPA with eclipse link. We have extensive JPA queries. Our
> code is in production for a while. Now we have a business use case, to
> support multitenancy.
>
> We will be using the Oracle Pluggable Database mechanism where each
> client will have their database.
>
> In our code, in order to create an EntityManager, we have defined a
> Singleton Class.
>
> In places where we do any JPA queries, we fetch the EntityManager object
> from this Singleton Class and store the instance of EntityManager as a
> static variable and reuse in our code.
>
>
>
> In multitenant use case, will the EntityManager instance be specific to
> the database of each of the client?
>
> My doubt is do we need to change our model of preparing the
> EntityManager and instantiate the EntityManager at class level or the
> current model works without any issues?

You might want to ask this in the Eclipse data tools forum where you'll
find more folk dedicated to questions like these.
Previous Topic:Installing Eclipse Standard and Eclipse IDE for Java EE Developers
Next Topic:Related to eclipse Icon View
Goto Forum:
  


Current Time: Tue Jul 22 19:49:00 EDT 2014

Powered by FUDForum. Page generated in 0.02285 seconds