Hi,
I got 2 bundles in my project. BundleA and BundleB.
BundleA has a ServiceA (annotated with @Service and @Component) that I want to inject (@Reference) into ServiceB which is in BundleB.
I'm not able to do so. My BundleB appears as Active in the console but it doesn't work.
Can someone shed some light?
Thank you very much.
Solved! Go to Solution.
Views
Replies
Total Likes
Have you looked not just at the bundles but also the services? Check the following:
Some potential reasons why you might be having trouble:
Views
Replies
Total Likes
See this Stack overflow thread
http://stackoverflow.com/questions/22807377/adobe-cq-injecting-services-via-reference-returns-null
Using @Reference is the correct way if you are referencin a service.
Views
Replies
Total Likes
Hi,
You need to add the bundle A as a dependency in Bundle B and then use the @reference of service A
Views
Replies
Total Likes
You mean in the pom.xml file? Can you provide me an example?
Thank you for replying
Views
Replies
Total Likes
Have you looked not just at the bundles but also the services? Check the following:
Some potential reasons why you might be having trouble:
Views
Replies
Total Likes