Searching for Session recurses when reading delegates of EntityManager
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16980 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
2ce2f49d24
commit
206283ad66
|
@ -86,10 +86,7 @@ public class AuditReaderFactory {
|
|||
}
|
||||
|
||||
if (entityManager.getDelegate() instanceof EntityManager) {
|
||||
entityManager = (EntityManager) entityManager.getDelegate();
|
||||
if (entityManager.getDelegate() instanceof Session) {
|
||||
return get((Session) entityManager.getDelegate());
|
||||
}
|
||||
return get((EntityManager) entityManager.getDelegate());
|
||||
}
|
||||
|
||||
throw new AuditException("Hibernate EntityManager not present!");
|
||||
|
|
Loading…
Reference in New Issue