org.codehaus.groovy.grails.webflow.persistence
Class FlowAwareCurrentSessionContext

java.lang.Object
  extended by org.springframework.orm.hibernate3.SpringSessionContext
      extended by org.codehaus.groovy.grails.webflow.persistence.FlowAwareCurrentSessionContext
All Implemented Interfaces:
Serializable, org.hibernate.context.CurrentSessionContext

public class FlowAwareCurrentSessionContext
extends SpringSessionContext

A Hibernate CurrentSessionContext that is aware of flow requests and looks up the Session from the flow instead of the current Thread

Since:
1.0

Created: Jan 18, 2008

Author:
Graeme Rocher
See Also:
Serialized Form

Constructor Summary
FlowAwareCurrentSessionContext(org.hibernate.engine.SessionFactoryImplementor sessionFactory)
          Create a new SpringSessionContext for the given Hibernate SessionFactory.
 
Method Summary
 org.hibernate.classic.Session currentSession()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowAwareCurrentSessionContext

public FlowAwareCurrentSessionContext(org.hibernate.engine.SessionFactoryImplementor sessionFactory)
Create a new SpringSessionContext for the given Hibernate SessionFactory.

Parameters:
sessionFactory - the SessionFactory to provide current Sessions for
Method Detail

currentSession

public org.hibernate.classic.Session currentSession()
                                             throws org.hibernate.HibernateException
Specified by:
currentSession in interface org.hibernate.context.CurrentSessionContext
Overrides:
currentSession in class SpringSessionContext
Throws:
org.hibernate.HibernateException


Copyright (c) 2005-2006 The Grails project