org.riotfamily.common.web.transaction
Interface TransactionExceptionHandler

All Superinterfaces:
TransactionalHandler

public interface TransactionExceptionHandler
extends TransactionalHandler

Interface that can be implemented by TransactionalHandlers in order to react on errors during a commit or rollback operation.

Author:
Felix Gnass [fgnass at neteye dot de]

Method Summary
 ModelAndView commitFailed(Exception ex, ModelAndView modelAndView, HttpServletRequest request, HttpServletResponse response)
          Invoked by the TransactionalHandlerInterceptor when an Exception occurs during commit.
 ModelAndView rollbackFailed(TransactionException ex, Exception rollbackCause, HttpServletRequest request, HttpServletResponse response)
          Invoked by the TransactionalHandlerInterceptor when a TransactionException occurs during rollback.
 

Method Detail

commitFailed

ModelAndView commitFailed(Exception ex,
                          ModelAndView modelAndView,
                          HttpServletRequest request,
                          HttpServletResponse response)
Invoked by the TransactionalHandlerInterceptor when an Exception occurs during commit. Implementors may return a ModelAndView or null in which case the exception is re-thrown.

Parameters:
ex - The exception thrown by the PlatformTransactionManager
modelAndView - The original ModelAndView
request - The request
response - The response
Returns:
A ModelAndView or null

rollbackFailed

ModelAndView rollbackFailed(TransactionException ex,
                            Exception rollbackCause,
                            HttpServletRequest request,
                            HttpServletResponse response)
Invoked by the TransactionalHandlerInterceptor when a TransactionException occurs during rollback. Implementors may return a ModelAndView or null in which case the exception is re-thrown.

Parameters:
ex - The exception thrown by the PlatformTransactionManager
rollbackCause - The exception that caused the rollback
request - The request
response - The response
Returns:
A ModelAndView or null