Class HibernateFilter
java.lang.Object
com.softslate.commerce.customer.core.BaseFilter
com.softslate.commerce.customer.core.HibernateFilter
- All Implemented Interfaces:
javax.servlet.Filter
A servlet filter that manages a single Hibernate Session for each request,
per the ThreadLocal model. (See www.hibernate.org for more information.)
This filter commits the thread's transaction at the end of the request, if it
is still open. Then it closes the Hibernate Session
.
- Author:
- David Tobey
-
Field Summary
Modifier and TypeFieldDescriptionprivate javax.servlet.FilterConfig
private static org.apache.commons.logging.Log
-
Constructor Summary
-
Method Summary
Methods inherited from class com.softslate.commerce.customer.core.BaseFilter
isStaticRequest
-
Field Details
-
log
private static org.apache.commons.logging.Log log -
filterConfig
private javax.servlet.FilterConfig filterConfig
-
-
Constructor Details
-
HibernateFilter
public HibernateFilter()
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException - Specified by:
init
in interfacejavax.servlet.Filter
- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroy
in interfacejavax.servlet.Filter
-