Reputation: 109
How can we access beans defined in Spring context files of one bundle into another?
Example might be ActiveMQ poolable connection factory: it doesn't make sense to define ActiveMQ connection factory in all the bundles.
One solution is to use OSGI service but Spring DM is decommissioned.
Upvotes: 0
Views: 276
Reputation: 3652
I guess you are looking for Gemini Blueprint: https://www.eclipse.org/gemini/blueprint/documentation/reference/1.0.2.RELEASE/html/index.html
Publish a service:
<osgi:service id="myService" ref="simpleService"
interface="org.xyz.MyService" />
Fetch a service:
<osgi:reference id="myService" interface="org.xyz.MyService"/>
Upvotes: 1