Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-206

Conversation related exceptions cannot be handled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.PFD
    • 1.1.EDR
    • Contexts
    • None

    Description

      This issue emerged after adding support for conversations as part of CDI-80

      The spec says:

      The conversation associated with a Servlet request is determined at the beginning of the request before calling any
      service() method of any servlet in the web application, calling the doFilter() method of any servlet filter in the web
      application and before the container calls any ServletRequestListener or AsyncListener in the web application.

      and

      If the propagated conversation cannot be restored, the container must associate the request with a new transient conversation and throw an exception of type javax.enterprise.context.NonexistentConversationException.

      The container ensures that a long-running conversation may be associated with at most one request at a time, by blocking
      or rejecting concurrent requests. If the container rejects a request, it must associate the request with a new transient conversation and throw an exception of type javax.enterprise.context.BusyConversationException.

      The conversation association is supposed to be done before any servlet, filter or listener is invoked. If the association fails (due to NonexistentConversationException or BusyConversationException), the application has no way of handling this failure gracefully. The Servlet error-page mechanism cannot be used portably because it is only handling uncaught exceptions thrown from a servlet / filter. Similarly, a commonly used exception handling mechanism - an outer filter that catches every uncaught exception, cannot be used since the association failure does not occur within the filter invocation.

      Attachments

        Issue Links

          Activity

            People

              pmuiratbleepbleep Pete Muir (Inactive)
              rhn-engineering-jharting Jozef Hartinger
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: