TransactionFilter
From CauchoWiki
com.caucho.filters.TransactionFilter wraps the request in a transaction. If the request completes normally, the transaction will commit, otherwise it will rollback.
[edit] TransactionFilter pseudo-code
try {
userTransaction.begin();
nextFilter.doFilter(request, response);
userTransaction.commit();
} catch (Exception e) {
userTransaction.rollback();
throw e;
}
The configuration in the resin-web.xml (or web.xml) is as follows:
[edit] resin-web.xml
<filter filter-name="transaction"
filter-class="com.caucho.filters.TransactionFilter"/>
<filter-mapping url-pattern="/transaction/*" filter-name="transaction"/>
