OpenWebBeans
  1. OpenWebBeans
  2. OWB-434

ThreadLocal<SingletonContext> doen't get cleaned up

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-alpha-1
    • Fix Version/s: 1.0.0-alpha-2
    • Component/s: Context and Scopes
    • Labels:
      None

      Description

      We currently store the active SingletonContext for each thread in a ThreadLocal.
      We must cleanup this ThreadLocal at the end of each request!

        Activity

        Hide
        Mark Struberg added a comment -

        latest tomcat6 sometimes shows the following in the log:

        SCHWERWIEGEND: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@17525fa]) and
        a value of type [org.apache.webbeans.context.SingletonContext] (value [org.apache.webbeans.context.SingletonContext@1041dc]) but failed to r
        emove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.

        Show
        Mark Struberg added a comment - latest tomcat6 sometimes shows the following in the log: SCHWERWIEGEND: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@17525fa] ) and a value of type [org.apache.webbeans.context.SingletonContext] (value [org.apache.webbeans.context.SingletonContext@1041dc] ) but failed to r emove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
        Hide
        Mark Struberg added a comment -

        resolved by moving the ThreadLocal cleanup at the very end of all operations.

        Show
        Mark Struberg added a comment - resolved by moving the ThreadLocal cleanup at the very end of all operations.
        Hide
        Mark Struberg added a comment -

        closed with release OpenWebBeans-1.0.0-alpha-2

        Show
        Mark Struberg added a comment - closed with release OpenWebBeans-1.0.0-alpha-2

          People

          • Assignee:
            Mark Struberg
            Reporter:
            Mark Struberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development