Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6080

HttpSessionListeners ain't getting triggered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • HTTP Service
    • None

    Description

      I am currently struggling with HTTP Whiteboard Session Listener. The custom HttpSessionListener callbacks are never getting triggered when HttpRequest#getSession() is invoked in servlets.
       
      As an example,

      @Component
      @HttpWhiteboardListener
      public final class ApplicationSession implements HttpSessionListener {
          private final AtomicInteger activeSessions = new AtomicInteger();
      
          @Override
          public void sessionCreated(final HttpSessionEvent sessionEvent) {
              activeSessions.incrementAndGet();
          }
          @Override
          public void sessionDestroyed(final HttpSessionEvent sessionEvent) {
              activeSessions.decrementAndGet();
          }
          public boolean isSessionValid() {
              return activeSessions.get() != 0;
          }
      }
      

       
      This is the custom listener I registered with the HTTP Whiteboard and it never gets invoked when I call HttpRequest#getSession().

      The SCR Component is ACTIVE, that means, it is not ignored but never triggered.

       
      GitHub Repo replicating the problem: https://github.com/amitjoy/whiteboard-httplistener-problem

      Attachments

        Activity

          People

            Unassigned Unassigned
            amitmondal Amit Mondal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: