Details

    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      Description

      There are a number of ThreadLocals in PicoContainer and PWR that are not correctly disposed of.

      DefaultPicoContainer#dispose should call

      intoThreadLocal.remove();
      intoThreadLocal = null;
      

      DefaultPicoContainer#getComponent(Object, Type) should call

              } finally {
                  intoThreadLocal.set(null);
                  intoThreadLocal.remove();
              }
      

      PicoServletContainerListener#contextDestroyed doesn't remove the ScopedContainers instance from the servlet context:

          public void contextDestroyed(ServletContextEvent event) {
              ScopedContainers scopedContainers = getScopedContainers(event.getServletContext());
              stop(scopedContainers.getApplicationContainer());
              dispose(scopedContainers.getApplicationContainer());
          }
      

      Storing#mapThreadLocalObjectReference should not be final and should be nulled by PicoServletContainerListener#contextDestroyed.

      I think that should help with the errors logged by Tomcat.

        People

        • Assignee:
          Michael Rimov
          Reporter:
          Johann Burkard
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: