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

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

GitHub user soleger opened a pull request:

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

    AMQ-6301: Changed activemq-osgi so that it embeds the spring-dm bundles

    This changes the activemq-osgi bundle so that it inline-embeds the 
spring-dm bundles which have been used inside the ActiveMQServiceFactory since 
version 5.13.0.
    
    To write tests for this, I had to hardcode the Spring versions so that they 
match the version from the particular version of Karaf that is used by Pax 
Exam. If somebody has a way to fetch these versions dynamically, that would 
make it easier to maintain.
    
    If this could also be merged for inclusion in version 5.13.x, that would be 
appreciated! Thanks.

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

    $ git pull https://github.com/soleger/activemq AMQ-6301

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

    https://github.com/apache/activemq/pull/187.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 #187
    
----
commit 91652493d7bf99345b74831ea568f0823f6d612a
Author: Seth Leger <[email protected]>
Date:   2016-05-22T21:49:44Z

    AMQ-6301: Changed activemq-osgi so that it embeds the spring-dm bundles
    so that we can avoid loading the spring-dm feature which causes Spring
    version conflicts.

----


> Embed spring-dm in activemq-osgi to avoid loading spring-dm in Karaf
> --------------------------------------------------------------------
>
>                 Key: AMQ-6301
>                 URL: https://issues.apache.org/jira/browse/AMQ-6301
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: OSGi/Karaf
>    Affects Versions: 5.13.0
>            Reporter: Seth Leger
>
> Embed spring-dm in activemq-osgi to avoid loading spring-dm in Karaf
> In commit 3a6d67e8f95320bea91b7c7106173c9b34773bc5, a test was fixed in issue 
> AMQ-4727 by reusing the spring-dm OsgiBundleXmlApplicationContext class 
> inside the ActiveMQServiceFactory managed service factory.
> To satisfy the import packages for activemq-osgi, the 'spring-dm' Karaf 
> feature was added to the main 'activemq-client' feature.
> This is problematic because loading the 'spring-dm' Karaf feature enables the 
> Spring DM deployer. This deployer is unnecessary in environments that rely on 
> Blueprint or CDI wiring and it may unexpectedly activate Spring DM bundles in 
> those environments. Because spring-dm was compiled against older versions of 
> Spring 3.0 and 3.1, it can also cause older versions of Spring features to be 
> loaded into the container.
> To avoid using the ‘spring-dm’ Karaf feature to provide the classes, I 
> propose embedding the spring-dm bundles inside activemq-osgi. Since they are 
> only used as library code to provide the BundleContext when parsing the 
> BrokerService context, they can be embedded safely without any dependency 
> issues.
> This is the root cause of the following issue:
> http://karaf.922171.n3.nabble.com/Karaf-4-0-3-unable-to-start-bundle-activemq-osgi-5-13-0-td4044640.html



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

Reply via email to