openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1155) BrokerImpl.detachAllInternal() does not detach newly loaded entities
Date Mon, 06 Jul 2009 16:17:14 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727608#action_12727608
] 

Jeremy Bauer commented on OPENJPA-1155:
---------------------------------------

Comment on patch.txt dated 2009-07-02 08:56 AM:

Resetting the compat flag should occur in a finally{} block.  Otherwise, the detach mgr. could
throw an exception and it the value would not get reset.

> BrokerImpl.detachAllInternal() does not detach newly loaded entities
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1155
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1155
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Dianne Richards
>            Assignee: Dianne Richards
>             Fix For: 2.0.0
>
>         Attachments: patch.txt
>
>
> During detach, it is possible for additional entities to be loaded if the openjpa.DetachState
property has been set to "all" or "fetch-groups". These entities may not be included in the
collection of entities that are identified in the BrokerImpl.detachAllInternal() method when
it calls the DetachManager.detachAll(collection) method. Before 2.0, these newly loaded entities
were always detached since the detach processing always cascaded. However, with the 2.0 spec
requirements for cascade, the default behavior no longer cascades. Therefore, there may be
some entities left in the persistence context after this processing occurs. detachAllInternal()
is associated with the clear(), close(), and afterCompletion() operations and it is expected
that the persistence context really be empty. To ensure this, the compatibility option of
cascadeWithDetach will be set to true by detachAllInternal() before calling the DetachManager.detach()
method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message