Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6441

MockHttpSession and MockSessionStore don't call onInvalidate() on invalidate()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.0.0-M6
    • Fix Version/s: 7.10.0, 8.0.0-M9
    • Component/s: wicket
    • Labels:
      None

      Description

      org.apache.wicket.protocol.http.mock.MockHttpSession on invalidate calls just:

      @Override
      public void invalidate()
      {
      	attributes.clear();
      	id = generateSessionId();
      }
      

      while org.apache.wicket.session.HttpSessionStore valueUnbound calls

      public void valueUnbound(final HttpSessionBindingEvent evt)
      {
      	String sessionId = evt.getSession().getId();
      	log.debug("Session unbound: {}", sessionId);
      	if (wicketSession != null)
      	{
      		wicketSession.onInvalidate();
      	}
      ...
      }
      

      (valueUnbound is called on org.apache.catalina.session.StandardSession.invalidate)

      this causes to be impossible to properly test what happens on invalidation of the session.

        Attachments

          Activity

            People

            • Assignee:
              mgrigorov Martin Tzvetanov Grigorov
              Reporter:
              eximius Kamil
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: