jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: support for multitenancy

From: michael keith <michael.keith_at_oracle.com>
Date: Tue, 10 Apr 2012 22:20:43 -0400

Good. Just wanted to make sure the thread was not misconstrued by
anyone, given that
     "Right. For shared application instances we will need this."
was followed by
     "You had said this would be available via ENC/JNDI before I think?"

On 10/04/2012 8:18 PM, Steve Ebersole wrote:
> Sorry if you got that impression. That was not what I meant.
> Sophisticated multi-tenancy implementations supporting this (what
> y'all like to call SaaS) approach would already have means to
> contextually obtain this information. And its already been determined
> (and repeated) this approach wont be a standardized part of JPA 2.1 ;)
>
> I was just trying to figure out how providers would found out the
> tenant when "starting up". Linda, you said the values would get
> passed in to the "createEMF". Does that cover both
> createEntityManagerFactory and createContainerEntityManagerFactory? I
> assume this value be part of the "integration map" under a known key?
>
>
> On 04/10/2012 04:25 PM, michael keith wrote:
>> Er.. just to clarify...
>> We started out talking about a per-thread tenant id for SaaS (to be
>> offered in the future) and am I right that somehow the impression was
>> given that that tenant id will be in JNDI or passed in EE 7? As it
>> stands right now (in EE 7), containers are not going to pass in (or post
>> in JNDI) the tenant id of a per-thread (SaaS) tenant. They will only be
>> expected to maintain a single tenant id for the life of an application
>> instance, so this won't help for SaaS.
>>
>> On 10/04/2012 1:19 PM, Linda DeMichiel wrote:
>>>
>>>
>>> On 4/10/2012 10:16 AM, Steve Ebersole wrote:
>>>> On 04/10/2012 11:33 AM, Linda DeMichiel wrote:
>>>>>
>>>>>
>>>>> On 4/10/2012 9:26 AM, Steve Ebersole wrote:
>>>>>>>>>> Ideally, the management of the tenant id should be transparent
>>>>>>>>>> to the
>>>>>>>>>> application, although we should revisit this in Java EE 8 as we
>>>>>>>>>> move
>>>>>>>>>> further into support for SaaS.
>>>>>>>>>
>>>>>>>>> For the application to not have to manage tenant ids, I guess the
>>>>>>>>> tenant identifier
>>>>>>>>> would need to be available to the provider on a per-invocation
>>>>>>>>> basis
>>>>>>>>> (in a thread
>>>>>>>>> context set by the container)? As you mention, not something
>>>>>>>>> that we
>>>>>>>>> necessarily have to worry about now, but just so we know what we
>>>>>>>>> will
>>>>>>>>> need
>>>>>>>>> in the future if this is what we want.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Right. For shared application instances we will need this.
>>>>>>>
>>>>>>> You had said this would be available via ENC/JNDI before I think?
>>>>>>
>>>>>> Will the tenant identifier be available in ENC/JNDI regardless of
>>>>>> strategy being used?
>>>>>>
>>>>>
>>>>> Yes
>>>>
>>>> And will it be available from JNDI when the EMF is being built?
>>>
>>> I wasn't assuming that. I was assuming that the container would pass
>>> in the
>>> requisite information to the createEMF call, as we do today.
>>>
>