org.jencks.interceptor
Class TransactionContexFilter

java.lang.Object
  extended by org.jencks.interceptor.TransactionContexFilter
All Implemented Interfaces:
javax.servlet.Filter

public class TransactionContexFilter
extends java.lang.Object
implements javax.servlet.Filter

This servlet filter is used to enter in a transactional context automtically at every servlet call and exit of it when the response is sent back to the client.

This class must be used with a mechanism (for example, Acegi) to use injection on filters.

The following is an example of use:

... Geronimo Transaction Context Filter org.springframework.web.filter.DelegatingFilterProxy targetBeanName org.springframework.jca.interceptor.TransactionContexFilter

Geronimo Transaction Context Filter /* ...

Author:
Thierry Templier
See Also:
TrackedConnectionAssociator.enter(ConnectorInstanceContext), TrackedConnectionAssociator.exit(ConnectorInstanceContext), ConnectorInstanceContext, ConnectorInstanceContextImpl

Constructor Summary
TransactionContexFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          This is the central method of the filter which allows the request to enter in a transactionnal context and exit when the request is sent back to the client.
 java.util.Set getApplicationManagedSecurityResources()
           
 org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator getAssociator()
           
 java.util.Set getUnshareableResources()
           
 void init(javax.servlet.FilterConfig config)
           
 void setApplicationManagedSecurityResources(java.util.Set applicationManagedSecurityResources)
           
 void setAssociator(org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator associator)
          Set the TrackedConnectionAssociator instance to allow the bean to enter and exit a transactional context.
 void setUnshareableResources(java.util.Set unshareableResources)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionContexFilter

public TransactionContexFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
This is the central method of the filter which allows the request to enter in a transactionnal context and exit when the request is sent back to the client.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

getAssociator

public org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator getAssociator()

setAssociator

public void setAssociator(org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator associator)
Set the TrackedConnectionAssociator instance to allow the bean to enter and exit a transactional context.


getUnshareableResources

public java.util.Set getUnshareableResources()

setUnshareableResources

public void setUnshareableResources(java.util.Set unshareableResources)

getApplicationManagedSecurityResources

public java.util.Set getApplicationManagedSecurityResources()

setApplicationManagedSecurityResources

public void setApplicationManagedSecurityResources(java.util.Set applicationManagedSecurityResources)


Copyright © 2010 LogicBlaze, Inc.. All Rights Reserved.