[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4637?page=c...
]
Galder Zamarreno resolved HHH-4637.
-----------------------------------
Resolution: Won't Fix
Fix Version/s: (was: 3.5.0-Beta-4)
Cache provider implementations don't have access to the configured class mappings and
so they cannot check the cache usage of a particular entity/collection, except
buildAccessStrategy is called but for this to happen, the cache usage has to be defined
somehow. If cache usage is undefined, buildAccessStrategy is not called and there's no
other opportunity to check the cache usage.
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
[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#...
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira