Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-877

ParentClassLoaderFinder default strategy is broken for embedded OpenEJB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Not A Problem
    • 1.5.1
    • 1.6.0
    • None
    • None

    Description

      ParentClassLoaderFinder default strategy always uses the ClassLoader which got used to load OpenEJB.class. But this algorithm is broken for all scenarios where a classloader hierarchy is in place.

      Instead of this we should use the Thread.currentThread.getContextClassLoader() by default.

      Please note that is is effectively not possible to set a custom ParrentClassLoaderFinder (via SystemInstance.get().setComponent(ParentClassLoaderFinder.class,... ) when using EJBContainer.createEJBContainer() as this gets cleared via SystemInstance.reset() at boot time.

      Attachments

        1. TOMEE-877.patch
          1.0 kB
          Mark Struberg

        Issue Links

          Activity

            People

              Unassigned Unassigned
              struberg Mark Struberg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: