diff --git a/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java b/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java index 1eba65d151..7adc423086 100755 --- a/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java +++ b/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java @@ -645,8 +645,10 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage if ( clazz.equals( SessionImplementor.class ) ) { return ( T ) getSession(); } - //FIXME - return null; //To change body of implemented methods use File | Settings | File Templates. + else { + //unknown class type + throw new PersistenceException( "Hibernate cannot unwrap " + clazz); + } } private void joinTransaction(boolean ignoreNotJoining) {