org.codehaus.groovy.grails.orm.hibernate.support
Class GrailsOpenSessionInViewFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
org.codehaus.groovy.grails.orm.hibernate.support.GrailsOpenSessionInViewFilter
- All Implemented Interfaces:
- javax.servlet.Filter, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.web.context.ServletContextAware
public class GrailsOpenSessionInViewFilter
- extends org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
Uses the GrailsApplication sesssionFactory to apply the filter
- Since:
- Oct 20, 2005
- Author:
- Graeme Rocher
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 |
Method Summary |
protected void |
closeSession(org.hibernate.Session session,
org.hibernate.SessionFactory sessionFactory)
|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.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 |
GrailsOpenSessionInViewFilter
public GrailsOpenSessionInViewFilter()
lookupSessionFactory
protected org.hibernate.SessionFactory lookupSessionFactory()
- Overrides:
lookupSessionFactory
in class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
getSession
protected org.hibernate.Session getSession(org.hibernate.SessionFactory sessionFactory)
throws org.springframework.dao.DataAccessResourceFailureException
- Overrides:
getSession
in class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
- Throws:
org.springframework.dao.DataAccessResourceFailureException
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doFilterInternal
in class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
- Throws:
javax.servlet.ServletException
java.io.IOException
closeSession
protected void closeSession(org.hibernate.Session session,
org.hibernate.SessionFactory sessionFactory)
- Overrides:
closeSession
in class org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
Copyright (c) 2005-2006 The Grails project