[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5303?page=c...
]
Steve Ebersole commented on HHH-5303:
-------------------------------------
From what I can tell 'hibernate.ejb.classcache' settings take
effect no matter what because they kind of operate outside of the caching annotations
stuff. I guess this looks kind of "non-unified". It almost seems to me that
'hibernate.ejb.classcache' is trumping all else. Perhaps that was the original
design decision here, I do not know.
The only ways that I can see cacheAnn as null is that you did not specify @Cache and
either:
# You used SharedCacheMode.NONE or UNSPECIFIED (or did not specify)
# You used SharedCacheMode.ENABLE_SELECTIVE and had @Cacheble(false) or did not specify
@Cacheable
# You used SharedCacheMode.DISABLE_SELECTIVE and had @Cacheble(false)
@Cachable has no effect
-----------------------
Key: HHH-5303
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5303
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2), entity-manager
Affects Versions: 3.5.2
Environment: Tested on HSQL (included in testcase) and MySQL database
Reporter: Paul Bakker
Attachments: testcase.zip
The JPA 2.0 @Cachable annotation has no effect at all. Just putting @Cachable on a class
is not enough to enable caching. You must also configure a concurrency strategy with
either @Cache or a hibernate.ejb.classcache setting in persistence.xml.
If those settings are in place, @Cacheble still has no effect. Entities are cached, but
@Cachable(false) doesn't change this behavior.
I included a Maven example project that tests this behavior. The project has two profiles
to switch between Hibernate and EclipseLink:
mvn -P hibernate clean test
mvn -P eclipselink clean test
--
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