Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.shield
Class SeamExceptionHandlingListener

java.lang.Object
  extended by org.nuxeo.ecm.platform.web.common.exceptionhandling.service.NullExceptionHandlingListener
      extended by org.nuxeo.ecm.webapp.shield.SeamExceptionHandlingListener
All Implemented Interfaces:
ExceptionHandlingListener

public class SeamExceptionHandlingListener
extends NullExceptionHandlingListener

Plays with conversations, trying to rollback transaction.

Author:
arussel

Constructor Summary
SeamExceptionHandlingListener()
           
 
Method Summary
 void afterDispatch(Throwable t, HttpServletRequest request, HttpServletResponse response)
          Cleans up context created in beforeSetErrorPageAttribute(Throwable, HttpServletRequest, HttpServletResponse) when needed.
 void beforeSetErrorPageAttribute(Throwable t, HttpServletRequest request, HttpServletResponse response)
          Initiates a mock faces context when needed and tries to restore current conversation
 void startHandling(Throwable t, HttpServletRequest request, HttpServletResponse response)
          Rollbacks transaction if necessary
 
Methods inherited from class org.nuxeo.ecm.platform.web.common.exceptionhandling.service.NullExceptionHandlingListener
beforeForwardToErrorPage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeamExceptionHandlingListener

public SeamExceptionHandlingListener()
Method Detail

beforeSetErrorPageAttribute

public void beforeSetErrorPageAttribute(Throwable t,
                                        HttpServletRequest request,
                                        HttpServletResponse response)
                                 throws IOException,
                                        ServletException
Initiates a mock faces context when needed and tries to restore current conversation

Specified by:
beforeSetErrorPageAttribute in interface ExceptionHandlingListener
Overrides:
beforeSetErrorPageAttribute in class NullExceptionHandlingListener
Throws:
IOException
ServletException

startHandling

public void startHandling(Throwable t,
                          HttpServletRequest request,
                          HttpServletResponse response)
                   throws ServletException
Rollbacks transaction if necessary

Specified by:
startHandling in interface ExceptionHandlingListener
Overrides:
startHandling in class NullExceptionHandlingListener
Throws:
ServletException

afterDispatch

public void afterDispatch(Throwable t,
                          HttpServletRequest request,
                          HttpServletResponse response)
                   throws IOException,
                          ServletException
Cleans up context created in beforeSetErrorPageAttribute(Throwable, HttpServletRequest, HttpServletResponse) when needed.

Specified by:
afterDispatch in interface ExceptionHandlingListener
Overrides:
afterDispatch in class NullExceptionHandlingListener
Throws:
IOException
ServletException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.