Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5821

Activator can trigger unwanted behaviour when loading classes from other bundles

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.11.1
    • Fix Version/s: 5.11.2, 5.12.0
    • Component/s: Broker
    • Labels:
      None

      Description

      Currently org.apache.activemq.util.osgi.Activator watches all other bundles and tries to load some classes using their classloader to check if they might implement extensions.

      This can go wrong if the bundle uses dynamic imports like e.g. jline does. In this case the jline bundle is triggered to load classes from ActiveMQ. This establishes a wiring from jline to ActiveMQ. If the ActiveMQ bundle are now refreshed or uninstalled jline also has to be refreshed which triggers refreshs of a lot more bundles.

      I propose to replace the class probing with checking of the bundle requirements. We simply check if the bundle has an import for the packages of the interface classes of ActiveMQ. So we avoid triggering classloading and the creation of unwanted wirings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                chris@die-schneider.net Christian Schneider
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: