You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/06/03 15:41:38 UTC

[jira] [Commented] (AMQ-5821) Activator can trigger unwanted behaviour when loading classes from other bundles

    [ https://issues.apache.org/jira/browse/AMQ-5821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14570831#comment-14570831 ] 

ASF GitHub Bot commented on AMQ-5821:
-------------------------------------

GitHub user cschneider opened a pull request:

    https://github.com/apache/activemq/pull/107

    [AMQ-5821] Avoid probing of classes in Activator

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cschneider/activemq AMQ-5821

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq/pull/107.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #107
    
----
commit 63cd4eef067c5e3294ade40c0ed3f1c60b8e6c9e
Author: Christian Schneider <ch...@die-schneider.net>
Date:   2015-06-03T13:40:03Z

    [AMQ-5821] Avoid probing of classes in Activator

----


> Activator can trigger unwanted behaviour when loading classes from other bundles
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-5821
>                 URL: https://issues.apache.org/jira/browse/AMQ-5821
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.11.1
>            Reporter: Christian Schneider
>             Fix For: 5.11.2, 5.12.0
>
>
> 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. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)