[seam-commits] Seam SVN: r8548 - branches/Seam_2_0/src/ioc/org/jboss/seam/ioc/spring.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Jul 31 11:09:05 EDT 2008
Author: youngm
Date: 2008-07-31 11:09:05 -0400 (Thu, 31 Jul 2008)
New Revision: 8548
Modified:
branches/Seam_2_0/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java
Log:
JBSEAM-3125
Modified: branches/Seam_2_0/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java
===================================================================
--- branches/Seam_2_0/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java 2008-07-31 11:48:29 UTC (rev 8547)
+++ branches/Seam_2_0/src/ioc/org/jboss/seam/ioc/spring/SeamManagedSessionFactoryBean.java 2008-07-31 15:09:05 UTC (rev 8548)
@@ -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