Exam AD0-E103 All QuestionsBrowse all questions from this exam
Question 21

A developer needs to create an OSGi service to run on an Author instance and send out newsletters at periodic intervals. Intervals should be customized using the

Web Console Configuration. Concurrent execution must be prevented.

Which code snippet should a developer use to achieve?

A.

B.

C.

D.

    Correct Answer:

    The correct option is A. The code snippet in option A utilizes @Component and @Designate annotations to configure an OSGi service as Runnable, which can be scheduled at periodic intervals using the web console configuration. It allows for the intervals to be customized and ensures that concurrent execution can be prevented by setting the scheduler_concurrent property to false. The Config interface with @ObjectClassDefinition and @AttributeDefinition annotations enables the configuration through the OSGi web console.

Discussion
grios

The only answer that allows the OSGI Configuration is A. So the correct answer is A

pkg82

Answer is A

chunpin

Answer: A Reference: https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html