[seam-commits] Seam SVN: r8550 - trunk/src/ioc/org/jboss/seam/ioc/spring.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Jul 31 11:19:11 EDT 2008


Author: youngm
Date: 2008-07-31 11:19:10 -0400 (Thu, 31 Jul 2008)
New Revision: 8550

Modified:
   trunk/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java
Log:
JBSEAM-3125

Modified: trunk/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java
===================================================================
--- trunk/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java	2008-07-31 15:10:36 UTC (rev 8549)
+++ trunk/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java	2008-07-31 15:19:10 UTC (rev 8550)
@@ -23,7 +23,7 @@
 /**
  * A SessionFactory that delegates requests to open a Session to a
  * "managed-hibernate-session".
- * 
+ *
  * @author Mike Youngstrom
  */
 public class SeamManagedSessionFactoryBean extends AbstractFactoryBean
@@ -74,7 +74,7 @@
     * Optionally provide an instance of the SessionFactory we are wrapping. Only
     * necessary if the proxy needs to expose access to any interfaces besides
     * SessionFactory.class.
-    * 
+    *
     * @param baseSessionFactory
     */
    public void setBaseSessionFactory(SessionFactory baseSessionFactory)
@@ -84,7 +84,7 @@
 
    /**
     * The name of the Seam "managed-hibernate-session" component.
-    * 
+    *
     * @param sessionName
     */
    @Required
@@ -96,9 +96,9 @@
    /**
     * Proxy for a SessionFactory. Returning a close suppressing proxy on calls
     * to "openSession".
-    * 
+    *
     * @author Mike Youngstrom
-    * 
+    *
     */
    public static class SeamManagedSessionFactoryHandler implements InvocationHandler, Serializable
    {
@@ -165,6 +165,8 @@
          }
          if (method.getName().equals("close"))
          {
+            Session session = getSession();
+            session.disconnect();
             isClosed = true;
             return null;
          }
@@ -228,7 +230,7 @@
 
    /**
     * Delegates calls to a hibernate session and suppresses calls to close.
-    * 
+    *
     * @author Mike Youngstrom
     */
    public static class SeamManagedSessionHandler implements InvocationHandler, Serializable
@@ -288,6 +290,7 @@
          if (method.getName().equals("close"))
          {
             log.debug("Closing Session Proxy.");
+            delegate.disconnect();
             closed = true;
             return null;
          }




More information about the seam-commits mailing list