jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: changes for 7.6.2 Container-managed Transaction-scoped Persistence Context

From: Scott Marlow <smarlow_at_redhat.com>
Date: Tue, 29 Nov 2011 15:15:27 -0500

On 11/29/2011 02:19 PM, Linda DeMichiel wrote:
>
>
> On 11/29/2011 11:06 AM, Scott Marlow wrote:
>> Hi Linda,
>>
>>>
>>> Perhaps I am failing to grasp your concern here, but I see the intention
>>> of the last
>>> paragraph of section 7.6.2 as specifying the user-visible behavior that
>>> is required
>>> to result. Your paragraph above describes a possible implementation
>>> strategy to
>>> achieve it, but I don't think the spec needs to include that.
>>>
>>
>>
>> I think that the current 7.6.2 wording "detached at the end of the
>> method call", is ambiguous about which method call is
>> intended (the entity manager method invocation or the container level
>> method invocation.)
>>
>> I think that clarifying it with one of the following changes, would
>> eliminate the ambiguity.
>>
>> Updated proposal for last paragraph in 7.6.2:
>>
>> "
>> If the entity manager is invoked outside the scope of a transaction,
>> any entities loaded from the database will
>> immediately become detached at the end of the container level method
>> invocation call.
>> "
>
> Just to be very clear.... What are you referring to by "container level
> method
> invocation call"? The call to the entity manager proxy?

Not the call to the entity manager proxy. I mean the code that is
calling the entity manager proxy (e.g. a session bean calling the entity
manager proxy.)

Perhaps a clearer proposal could be:

"
If the entity manager is invoked outside the scope of a transaction, any
entities loaded from the database will immediately become detached at
the end of the container level method invocation call (e.g. when the
session bean method ends).
"

>
> thanks,
>
> -Linda
>
>
>>
>> Regards,
>> Scott