Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to import osgi blueprint xml

I am trying to import an OSGI blueprint XML file in to another OSGi blueprint XML file.

e.g.: blueprint1.xml:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint ....>
    <bean id="myBean1" class="com.company.Class1"/>
    <bean id="myBean2" class="com.company.Class2"/>
</blueprint>
</xml>

blueprint2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint ....>
    <!-- DOES NOT WORK -->
    <import resource="blueprint1.xml" />
</blueprint>

The <import> works for spring but not for blueprint.

Does anybody know a way of doing this in OSGi blueprint XML files?

like image 816
user896805 Avatar asked Aug 06 '12 10:08

user896805


1 Answers

Apparently, Spring like imports are not currently possible in blueprint.

However, if the files are in the same OSGi bundle then they are in the same context and can be used from other blueprint files.

Also, see here: http://fusesource.com/forums/message.jspa?messageID=15091#15091

like image 150
user896805 Avatar answered Sep 22 '22 02:09

user896805