Calling a service from different bundles | Adobe Higher Education
Skip to main content
Level 2
July 15, 2024
解決済み

Calling a service from different bundles

  • July 15, 2024
  • 1 の返信
  • 727 ビュー

There is a requirement where I have a service (lets say GetBundleInfoservice) in Bundle A. Now I need to access this service in Bundle B. What should be my approach. I have a servlet which returns a Json using that Service. However, I should atleast be able to call the service from Bundle A to Bundle B? Any suggestions?

このトピックへの返信は締め切られました。
ベストアンサー Saravanan_Dharmaraj

@rekhaad7473 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/access-service-from-another-aem-bundle/m-p/326674

 

You need to make sure the service in Bundle A is getting exported. In Bundle B pom.xml, add the dependency of Bundle A. Once you have the dependency you can instantiate with (@Reference) and call the service methods in Bundle A.

 

1 の返信

Saravanan_Dharmaraj
Community Advisor
Community Advisor
July 15, 2024

@rekhaad7473 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/access-service-from-another-aem-bundle/m-p/326674

 

You need to make sure the service in Bundle A is getting exported. In Bundle B pom.xml, add the dependency of Bundle A. Once you have the dependency you can instantiate with (@Reference) and call the service methods in Bundle A.

 

RekhaAd7473作成者
Level 2
July 16, 2024

Thank you, will try this out.