Hibernate SVN: r16204 - core/trunk/envers/src/main/java/org/hibernate/envers.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2009-03-20 10:57:08 -0400 (Fri, 20 Mar 2009)
New Revision: 16204
Modified:
core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java
Log:
Fixed looking for session delegate
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java 2009-03-20 13:20:14 UTC (rev 16203)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/AuditReaderFactory.java 2009-03-20 14:57:08 UTC (rev 16204)
@@ -43,15 +43,18 @@
/**
* Create an audit reader associated with an open session.
- * <b>WARNING:</b> Using Envers with Hibernate (not with Hibernate Entity Manager/JPA) is experimental,
- * if possible, use {@link AuditReaderFactory#get(javax.persistence.EntityManager)}.
* @param session An open session.
* @return An audit reader associated with the given sesison. It shouldn't be used
* after the session is closed.
* @throws AuditException When the given required listeners aren't installed.
*/
public static AuditReader get(Session session) throws AuditException {
- SessionImplementor sessionImpl = (SessionImplementor) session;
+ SessionImplementor sessionImpl;
+ if (!(session instanceof SessionImplementor)) {
+ sessionImpl = (SessionImplementor) session.getSessionFactory().getCurrentSession();
+ } else {
+ sessionImpl = (SessionImplementor) session;
+ }
EventListeners listeners = sessionImpl.getListeners();
@@ -83,6 +86,7 @@
}
if (entityManager.getDelegate() instanceof EntityManager) {
+ entityManager = (EntityManager) entityManager.getDelegate();
if (entityManager.getDelegate() instanceof Session) {
return get((Session) entityManager.getDelegate());
}
15 years, 9 months
Hibernate SVN: r16203 - in validator/trunk: hibernate-validator and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-03-20 09:20:14 -0400 (Fri, 20 Mar 2009)
New Revision: 16203
Modified:
validator/trunk/hibernate-validator-legacy/pom.xml
validator/trunk/hibernate-validator/pom.xml
validator/trunk/pom.xml
Log:
upped version numbers
Modified: validator/trunk/hibernate-validator/pom.xml
===================================================================
--- validator/trunk/hibernate-validator/pom.xml 2009-03-20 13:14:10 UTC (rev 16202)
+++ validator/trunk/hibernate-validator/pom.xml 2009-03-20 13:20:14 UTC (rev 16203)
@@ -2,7 +2,7 @@
<parent>
<artifactId>hibernate-validator-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>4.0.0.Alpha3</version>
+ <version>4.0.0.Alpha4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -178,4 +178,4 @@
</plugin>
</plugins>
</reporting>
-</project>
\ No newline at end of file
+</project>
Modified: validator/trunk/hibernate-validator-legacy/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-legacy/pom.xml 2009-03-20 13:14:10 UTC (rev 16202)
+++ validator/trunk/hibernate-validator-legacy/pom.xml 2009-03-20 13:20:14 UTC (rev 16203)
@@ -4,7 +4,7 @@
<parent>
<artifactId>hibernate-validator-parent</artifactId>
<groupId>org.hibernate</groupId>
- <version>4.0.0.Alpha3</version>
+ <version>4.0.0.Alpha4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>hibernate-validator-legacy</artifactId>
Modified: validator/trunk/pom.xml
===================================================================
--- validator/trunk/pom.xml 2009-03-20 13:14:10 UTC (rev 16202)
+++ validator/trunk/pom.xml 2009-03-20 13:20:14 UTC (rev 16203)
@@ -3,7 +3,7 @@
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-parent</artifactId>
<packaging>pom</packaging>
- <version>4.0.0.Alpha3</version>
+ <version>4.0.0.Alpha4-SNAPSHOT</version>
<name>Hibernate Validator Parent</name>
<url>http://validator.hibernate.org</url>
@@ -232,4 +232,4 @@
</plugin>
</plugins>
</reporting>
-</project>
\ No newline at end of file
+</project>
15 years, 9 months
Hibernate SVN: r16202 - validator/tags.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-03-20 09:14:10 -0400 (Fri, 20 Mar 2009)
New Revision: 16202
Added:
validator/tags/v4_0_0_Alpha3/
Log:
Created tag v4_0_0_Alpha3.
Copied: validator/tags/v4_0_0_Alpha3 (from rev 16201, validator/trunk)
15 years, 9 months