[jboss-cvs] JBossAS SVN: r82274 - projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/hibernate.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 15 03:55:52 EST 2008


Author: wolfc
Date: 2008-12-15 03:55:52 -0500 (Mon, 15 Dec 2008)
New Revision: 82274

Modified:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/hibernate/ExtendedSessionInvocationHandler.java
Log:
EJBTHREE-1628: fixed NPE

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/hibernate/ExtendedSessionInvocationHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/hibernate/ExtendedSessionInvocationHandler.java	2008-12-15 08:10:57 UTC (rev 82273)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/entity/hibernate/ExtendedSessionInvocationHandler.java	2008-12-15 08:55:52 UTC (rev 82274)
@@ -24,8 +24,9 @@
 
 import java.io.Serializable;
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
+
 import javax.persistence.EntityManager;
 
 import org.hibernate.Session;
@@ -82,6 +83,9 @@
       else if ( "close".equals( methodName ) ) {
          throw new IllegalStateException("It is illegal to close an injected Hibernate Session");
       }
+      else if("toString".equals(methodName)) {
+         return toString() + "[identity=" + identity + "]";
+      }
       else {
          //catch all
          try {




More information about the jboss-cvs-commits mailing list