servlet-spec
  1. servlet-spec
  2. SERVLET_SPEC-38

Listeners were not invoked in a random order prior to Servlet 3.0 spec

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Section 1.6.1 Listener ordering, a subsection of 1.6 Compatibility with Java Servlet Specification Version 2.5 states

      Prior to this release of the specification, listeners were invoked in a random order. [...]

      However, the Servlet Specification Version 2.5 already specified on page 78 in SRV.10.3.2 Deployment Declarations, SRV.10.3.3 Listener Registration and SRV.10.3.4 Notifications At Shutdown that the order is taken from the deployment descriptor:

      SRV.10.3.2 Deployment Declarations
      [...] [Listener classes] are listed by class name in the order in which they are to be invoked.

      SRV.10.3.3 Listener Registration
      The Web container registers the listener instances according to [...]
      the order in which they appear in the deployment descriptor. During Web
      application execution, listeners are invoked in the order of their registration.

      SRV.10.3.4 Notifications At Shutdown
      On application shutdown, listeners are notified in reverse order to their declarations
      with notifications to session listeners preceeding notifications to context listeners.
      Session listeners must be notified of session invalidations prior to context listeners
      being notified of application shutdown.

        Activity

        Hide
        Shing Wai Chan added a comment -

        1. remove 1.6.1
        2. Clarification in 8.2.3 (p.77) and 11.3.3

        Sending eod-pluggability.fm
        Sending events.fm
        Sending overview.fm
        Sending servletobjects.fm
        Sending status.fm
        Transmitting file data .....
        Committed revision 39.

        Show
        Shing Wai Chan added a comment - 1. remove 1.6.1 2. Clarification in 8.2.3 (p.77) and 11.3.3 Sending eod-pluggability.fm Sending events.fm Sending overview.fm Sending servletobjects.fm Sending status.fm Transmitting file data ..... Committed revision 39.

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            Christian Ludt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: