Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mentawai.filter
Class TransactionFilter  view TransactionFilter download TransactionFilter.java

java.lang.Object
  extended byorg.mentawai.filter.TransactionFilter
All Implemented Interfaces:
org.mentawai.core.Filter

public class TransactionFilter
extends java.lang.Object
implements org.mentawai.core.Filter

Use this filter to put your action inside a transaction. You action will be commited or rolledback depending on its result. The default is to commit if and only if your action returns SUCCESS. However you can pass your own results to define a commit.


Field Summary
private  java.util.List results
           
private  java.lang.String transaction_key
           
private static java.lang.String TRANSACTION_KEY
           
 
Constructor Summary
TransactionFilter()
           
TransactionFilter(java.lang.String transaction_key)
           
TransactionFilter(java.lang.String[] results)
           
TransactionFilter(java.lang.String transaction_key, java.lang.String[] results)
           
 
Method Summary
 void destroy()
          Gives a chance to the filter to deallocalte any resources before it is destroyed.
 java.lang.String filter(org.mentawai.core.InvocationChain chain)
          Executes the filter.
 java.util.List getResultsForCommit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSACTION_KEY

private static final java.lang.String TRANSACTION_KEY
See Also:
Constant Field Values

transaction_key

private java.lang.String transaction_key

results

private java.util.List results
Constructor Detail

TransactionFilter

public TransactionFilter()

TransactionFilter

public TransactionFilter(java.lang.String transaction_key)

TransactionFilter

public TransactionFilter(java.lang.String[] results)

TransactionFilter

public TransactionFilter(java.lang.String transaction_key,
                         java.lang.String[] results)
Method Detail

filter

public java.lang.String filter(org.mentawai.core.InvocationChain chain)
                        throws java.lang.Exception
Description copied from interface: org.mentawai.core.Filter
Executes the filter.

Specified by:
filter in interface org.mentawai.core.Filter

getResultsForCommit

public java.util.List getResultsForCommit()

destroy

public void destroy()
Description copied from interface: org.mentawai.core.Filter
Gives a chance to the filter to deallocalte any resources before it is destroyed. This is called when the web application is stopped, in other words, this has nothing to do with garbage collection.

Specified by:
destroy in interface org.mentawai.core.Filter