]
Gail Badner commented on HHH-5030:
----------------------------------
Is this still an issue using 3.5.1?
BaseRegionAdapter shouldn't rely on optional Cache#toMap method
---------------------------------------------------------------
Key: HHH-5030
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5030
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2)
Affects Versions: 3.5.0-CR-2
Environment: hibernate-oscache 3.5.0.Beta-1
Reporter: Adrian Hummel
Attachments: bugreport.zip
Get an {{UnsupportedOperationException}} when checking the L2 cache if it contains an
entity:
{code}
emf.getCache().contains(MyEntity.class, pk);
{code}
Result:
{code}
java.lang.UnsupportedOperationException
at org.hibernate.cache.OSCache.toMap(OSCache.java:126)
at
org.hibernate.cache.impl.bridge.BaseRegionAdapter.contains(BaseRegionAdapter.java:62)
at
org.hibernate.impl.SessionFactoryImpl$CacheImpl.containsEntity(SessionFactoryImpl.java:967)
at
org.hibernate.impl.SessionFactoryImpl$CacheImpl.containsEntity(SessionFactoryImpl.java:962)
at
org.hibernate.ejb.EntityManagerFactoryImpl$JPACache.contains(EntityManagerFactoryImpl.java:164)
...
{code}
The {{Cache#toMap}} method is optional (according to Javadoc), thus,
{{BaseRegionAdapter}} shouldn't rely on this method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: