[jboss-jira] [JBoss JIRA] (WFLY-12674) placeholder for deferDetach issue
Scott Marlow (Jira)
issues at jboss.org
Tue Oct 15 13:30:00 EDT 2019
Scott Marlow created WFLY-12674:
-----------------------------------
Summary: placeholder for deferDetach issue
Key: WFLY-12674
URL: https://issues.jboss.org/browse/WFLY-12674
Project: WildFly
Issue Type: Task
Components: JPA / Hibernate
Reporter: Scott Marlow
Assignee: Scott Marlow
[From related JPA expert group discussion|https://download.oracle.com/javaee-archive/jpa-spec.java.net/users/2011/11/0024.html]:
{code}
[jpa-spec users] [jsr338-experts] Re: changes for 7.6.2 Container-managed Transaction-scoped Persistence Context
This message: [ Message body ] [ More options (top, bottom) ]
Related messages: [ Next message ] [ Previous message ] [ In reply to ] [ Next in thread ] [ Replies ]
Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Linda DeMichiel <linda.demichiel_at_oracle.com>
Date: Tue, 29 Nov 2011 15:48:53 -0800
On 11/29/2011 12:15 PM, Scott Marlow wrote:
> 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).
> "
Ah, thanks. That is not the intended semantics. Rather it is that the
persistence context is created to service the method call that is made
on the entity manager only. It doesn't have the duration of a business
method invocation.
>
>>
>> thanks,
>>
>> -Linda
>>
>>
>>>
>>> Regards,
>>> Scott
{code}
[Some related AS5/6 JPA container code.|https://anonsvn.jboss.org/repos/jbossas/projects/jpa/trunk/impl/src/main/java/org/jboss/jpa/impl/tx/TransactionScopedEntityManager.java]
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list