[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4637) Check whether any custom entity/collection's cache usage is correct

Galder Zamarreno (JIRA) noreply at atlassian.com
Thu Dec 3 07:19:11 EST 2009


Check whether any custom entity/collection's cache usage is correct
-------------------------------------------------------------------

                 Key: HHH-4637
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4637
             Project: Hibernate Core
          Issue Type: New Feature
            Reporter: Galder Zamarreno
            Assignee: Galder Zamarreno
             Fix For: 3.5


[quote from Brian]Next, re: collection caching: I noticed that my collection caches weren't being created by the InfinispanRegionFactory (and no exceptions were thrown when I set custom eviction settings for them), so I looked through SessionFactoryImpl in the Hibernate code and saw that I have to explicitly set <cache usage=transactional/> on each collection, even if the owning entity has the transactional cache usage set (otherwise SessionFactoryImpl will never call buildCollectionRegion and collection caching won't get turned on).  Is this the intended behavior (that the cache usage has to be set explicitly on each collection)?  If so it might be useful to throw an exception in the InfinispanRegionFactory if the cache usage isn't set up as above, since in my case I had custom eviction settings for a collection that referred to a cache region that didn't exist. [/quote]

Hmmm, I suppose InfinispanRegionFactory might be able to check for any custom settings for any entity/collection and do a check for it, i.e. check if cache usage is transactional or read-only. Any other time where there's no specific setting per entity/collection, I don't think we can do that.

http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268562#4268562

-- 
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