Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2780

AxisHTTPSessionListener does not destroy ServiceLifeCycles, as it is supposed to

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4
    • 1.4.1
    • Basic Architecture
    • None

    Description

      The current code is:

      Enumeration e = session.getAttributeNames();
      while (e.hasMoreElements()) {
      Object next = e.nextElement();
      if (next instanceof ServiceLifecycle)

      { ((ServiceLifecycle)next).destroy(); }
      }

      This code will do nothing but iterate over the "Strings" returned by getAttributeNames().

      Probably you wanted to do that:

      Enumeration e = session.getAttributeNames();
      while (e.hasMoreElements()) {
      String attributeName = e.nextElement().toString();
      Object next = session.getAttribute(key);
      if (next != null && next instanceof ServiceLifecycle) { ((ServiceLifecycle)next).destroy(); }

      }

      In any way, the listener is only servlet 2.4+ compatible.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            public@ecopatz.de Olaf Krische

            Dates

              Created:
              Updated:

              Slack

                Issue deployment