org.codehaus.groovy.grails.orm.hibernate.support
Class GrailsOpenSessionInViewFilter

java.lang.Object
  extended by org.springframework.web.filter.GenericFilterBean
      extended by org.springframework.web.filter.OncePerRequestFilter
          extended by org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
              extended by org.codehaus.groovy.grails.orm.hibernate.support.GrailsOpenSessionInViewFilter
All Implemented Interfaces:
Filter, BeanNameAware, DisposableBean, InitializingBean, ServletContextAware

public class GrailsOpenSessionInViewFilter
extends OpenSessionInViewFilter

Uses the GrailsApplication sesssionFactory to apply the filter

Since:
Oct 20, 2005
Author:
Graeme Rocher

Field Summary
 
Fields inherited from class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
DEFAULT_SESSION_FACTORY_BEAN_NAME
 
Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
 
Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger
 
Constructor Summary
GrailsOpenSessionInViewFilter()
           
 
Method Summary
protected  void closeSession(org.hibernate.Session session, org.hibernate.SessionFactory sessionFactory)
           
protected  void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
           
protected  org.hibernate.Session getSession(org.hibernate.SessionFactory sessionFactory)
           
protected  org.hibernate.SessionFactory lookupSessionFactory()
           
 
Methods inherited from class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
getFlushMode, getSessionFactoryBeanName, isSingleSession, lookupSessionFactory, setFlushMode, setSessionFactoryBeanName, setSingleSession
 
Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, getAlreadyFilteredAttributeName, shouldNotFilter
 
Methods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setServletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrailsOpenSessionInViewFilter

public GrailsOpenSessionInViewFilter()
Method Detail

lookupSessionFactory

protected org.hibernate.SessionFactory lookupSessionFactory()
Overrides:
lookupSessionFactory in class OpenSessionInViewFilter

getSession

protected org.hibernate.Session getSession(org.hibernate.SessionFactory sessionFactory)
                                    throws DataAccessResourceFailureException
Overrides:
getSession in class OpenSessionInViewFilter
Throws:
DataAccessResourceFailureException

doFilterInternal

protected void doFilterInternal(HttpServletRequest request,
                                HttpServletResponse response,
                                FilterChain filterChain)
                         throws ServletException,
                                IOException
Overrides:
doFilterInternal in class OpenSessionInViewFilter
Throws:
ServletException
IOException

closeSession

protected void closeSession(org.hibernate.Session session,
                            org.hibernate.SessionFactory sessionFactory)
Overrides:
closeSession in class OpenSessionInViewFilter


Copyright (c) 2005-2009 The Grails project