Author: adamw
Date: 2009-06-30 11:11:37 -0400 (Tue, 30 Jun 2009)
New Revision: 16980
Modified:
core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java
Log:
Searching for Session recurses when reading delegates of EntityManager
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java
===================================================================
---
core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java 2009-06-30
15:10:53 UTC (rev 16979)
+++
core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java 2009-06-30
15:11:37 UTC (rev 16980)
@@ -86,10 +86,7 @@
}
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!");