From 1dd3e3a0bc30dd30c2e9edfeec1c654b2ad05d11 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Thu, 21 Jun 2012 09:38:37 -0500 Subject: [PATCH] HHH-7387 - Integrate Draft 6 of the JPA 2.1 spec --- .../main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hibernate-entitymanager/src/main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java b/hibernate-entitymanager/src/main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java index d330dfe03c..86e5573e6f 100755 --- a/hibernate-entitymanager/src/main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java +++ b/hibernate-entitymanager/src/main/java/org/hibernate/ejb/EntityManagerFactoryImpl.java @@ -334,7 +334,9 @@ public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory { if ( RegionFactory.class.isAssignableFrom( cls ) ) { return (T) sessionFactory.getSettings().getRegionFactory(); } - + if ( org.hibernate.Cache.class.isAssignableFrom( cls ) ) { + return (T) sessionFactory.getCache(); + } throw new PersistenceException( "Hibernate cannot unwrap Cache as " + cls.getName() ); } }