OSGi bundle that uses multiple services

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

OSGi bundle that uses multiple services

RickMeyer
Hello, I'm not sure this is the place to write this, but I found this forum and it seems like you might be able to point me in the right direction.

First off, I am pretty new to OSGi development, but I've been doing Java development for > 10 years.
I need to create an OSGi bundle that will run as a scheduled task, which will connect to a REST service and store the data it retrieved into the AEM CMS.

To do this I have been copying from these 2 examples:

Scheduling Adobe Experience Manager Jobs using Apache Sling
https://helpx.adobe.com/experience-manager/using/aem-first-components1.html

and, Persisting CQ data in the Java Content Repository
https://helpx.adobe.com/experience-manager/using/persisting-cq-data-java-content1.html

My code functions as far as the scheduler goes and it contacts the REST service, but the second service component never works. I believe this is because these examples are written with only 1 service in mind and that I probably need to make use of the annotation parameters to setup 2 completely different service components. I have not been able to find any clear documentation explaining how to do this though. Do you know of any explanations that would help me to work this out? Or are you able to offer an advice directly?

Thanks in advance,

Rick Meyer