Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-559

ExceptionHandler lifecycle

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.6
    • 0.7
    • JSF-Module
    • None

    Description

      From the original ticket:
      [quote]
      Generally, I'm also a bit confused by the exception handler setup, it looks like there is a application global instance held by the exception handler factory. Besides I don't think this is thread safe and the spec says ExceptionHandlers are request scoped - if there is an error while processing the exception or there is no other ExceptionHandler defined (e.g. Myfaces without org.apache.myfaces.ERROR_HANDLING=true) exceptions will not be removed and indefinitely delivered (ExceptionHandlerBroadcaster throws without marking as handled if there are no deltaspike handlers) for unrelated requests.
      [quote]

      Thought a bit more about this. By holding onto the wrapped exception handler in the exception handler factory, deltaspike effectively breaks the contract (application scoped vs. expected request scoped lifecycle) for all wrapped exception handlers. I can think of a very broad range of errors that may result from this - depending on the wrapped exception handlers (including the exceptions are delivered on every subsequent request error if unhandled). Imho, deltaspike must create a new exception handler in DeltaSpikeExceptionHandlerFactory.getExceptionHandler(). If retaining the exception events over requests is desired some out of band mechanism must be used.

      Moritz

      Attachments

        Activity

          People

            tandraschko Thomas Andraschko
            mbechler Moritz Bechler
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: