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:
Adam Warski 2009-06-30 15:11:37 +00:00
parent 2ce2f49d24
commit 206283ad66
1 changed files with 1 additions and 4 deletions

View File

@ -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!");