Hi Team, I have created custom service interface a in bundle A and i need to call this interface - a service in my other custom bundle service .can we directly do it using reference annotation after deploying bundle A in osgi Felix console or need to do other way . Hi All, thanks for your help.today I have used a service from different bundle to my bundle servlet class...and I have not exported and imported any service in pom of core .but I have added a dependency of the different bundle class in my bundles pom.xml and it shows automatically in system consolle manifiest details that service is imported. I need to check you that I only added maven dependency in my bundle pom which I got from dependency finder from console. Does we not need to do any import export for this?? Kindly reply team plz
Firstly, let's explore the definition of a bundle export vs bundle import. A bundle export exports a package to make the corresponding programs and resources available for use by other bundles. A bundle import, imports a package to use the corresponding programs and resources of another bundle.
Now to the question:
Your Bundle-A should export the package with the service interface as so: