|
It seems like in EE environments, the entity manager is wrapped: http://grepcode.com/file/repo1.maven.org/maven2/org.jboss.as/jboss-as-jpa/7.1.0.CR1/org/jboss/as/jpa/container/AbstractEntityManager.java#AbstractEntityManager
Thus, the "actual" entity manager returned by AbstractEntityManager#getEntityManager is not a proxy, I guess, and therefore unwrap works. By the way, wrapping the entity manager in a holder was also my workaround for the SE environment.
|