Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13505

Set context classloader for worker threads explicitly to prevent leaks

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Minor
    • 14.0.0.Dev02
    • 13.0.2.Final
    • Core
    • None

    Description

      new Thread(...) creates a thread using the same context classloader as the current thread.
      When application code invokes an operation that ends up creating an internal Infinispan thread, the internal thread ends up with the application thread's context classloader.

      This may cause leaks in an environment where the application's classloader can be unloaded before the DefaultCacheManager is stopped (e.g. in an application server where the cache manager is created outside the deployment, or with Spring Boot devtools automatic restart).

      Attachments

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei (Inactive)
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: