2 Replies Latest reply on Jan 23, 2013 5:00 AM by ffang

    How to reuse blueprint bean declarations across OSGi bundles?

    jasonnh

      Hi,

       

      I have a number of bundles all of which have blueprint xml files defining beans and sometimes camel contexts.  Most of them declare activemq beans to define the connection pooling to a fabric discovered broker.

       

      The XML for this is the same for each blueprint XML file and I would like to be able to replace that with a declaration in a single file (presumably in a common bundle).

       

      ActiveMq connection beans are just examples, there are other common beans whose declarations would benefit from being declared just once.

       

      I tried putting the beans in a common bundle under resources/com/mycompany/a/b/c folder, exporting that folder as a package in the common bundle and then importing in the places I need but it did not seem to be picked up.

       

      Does anybody know if it is possible to reuse blueprint xml bean declarations across bundles?

       

      Thanks

       

      Edited by: jasonnh on Jan 23, 2013 9:25 AM