[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4517) Hibernate/JBC integration doesn't property handle Entity/CollectionRegionAccessStrategy evict(Object)

Brian Stansberry (JIRA) noreply at atlassian.com
Mon Dec 14 23:05:08 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34958#action_34958 ] 

Brian Stansberry commented on HHH-4517:
---------------------------------------

I don't see a good solution to this. With JBC configured for invalidation (the norm with entity/collection caches) there's no way to communicate to other nodes that they should evict data, except by actually removing the data. And removing the data requires acquiring a lock, which JBC won't allow "without regard to transactional isolation." The existing impl removes the data, which I think is as good as we can do.

Fortunately, the evict(Object) method is not itself called by Hibernate as part of normal processing. This is unlike evictAll() which gets called anytime bulk HQL is executed. The evict(Object) is only called as a result of the application attempting to directly manipulating the cache via the SessionFactory API. I haven't seen any reports of users having problems with this, probably because directly manipulating the cache isn't common and those who do so aren't concerned about the "without regard to transactional isolation" semantic. 

> Hibernate/JBC integration doesn't property handle Entity/CollectionRegionAccessStrategy evict(Object)
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HHH-4517
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4517
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: caching (L2)
>    Affects Versions: 3.3.2, 3.5.0.Beta-1
>            Reporter: Brian Stansberry
>            Assignee: Brian Stansberry
>             Fix For: 3.5
>
>
> See HHH-3818 for a full discussion of the general issue. This JIRA deals with the evict(Object) case, as opposed to evictAll(). The solution is a bit more complex as it requires checking not just whether the entire region has been invalidated, but also particular keys.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list