com.subshell.persistence.filter
Class TransactionFilter

java.lang.Object
  extended by com.subshell.persistence.filter.TransactionFilter
All Implemented Interfaces:
Filter

public class TransactionFilter
extends Object
implements Filter

Filter implementation using a TransactionContextRunner to provide a transaction context for use throughout the request.


Constructor Summary
TransactionFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
           
protected  TransactionContextRunner getRunner()
          Creates and returns a new TransactionContextRunner in which to run the filter's Runnable.
 void init(FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionFilter

public TransactionFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Specified by:
init in interface Filter
Throws:
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain filterChain)
              throws ServletException
Specified by:
doFilter in interface Filter
Throws:
ServletException

getRunner

protected TransactionContextRunner getRunner()

Creates and returns a new TransactionContextRunner in which to run the filter's Runnable. This method is only called once during the filter's init() method.

This method creates a standard SimpleTransactionContextRunner. Subclasses may override this method to use an alternative TransactionContextRunner implementation.



Copyright © 2004-2005 subshell GmbH. All Rights Reserved.