Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-177

DelegatingBundle optimization

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.8
    • 3.8
    • bundleutils
    • None

    Description

      DelegatingBundle forwards loadClass() (among other functions) to multiple bundles. Right now the loadClass() implementation iterates over the bundles and attempts to load the class from each bundle until the class is successfully loaded.
      This method can actually be harmful in certain situations for example with bundles with DynamicImport-Package: *. It can needlessly establish a dynamic wired for the given package on each bundle in the list.
      One way to avoid this problem is to check (once CNFE is raised) if the given bundle is wired to some bundle that exports the given package. If so, there is no need to check the remaining bundles to load the class.

      Attachments

        Activity

          People

            gawor@mcs.anl.gov Jarek Gawor
            gawor@mcs.anl.gov Jarek Gawor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: