AD0-E103 Exam QuestionsBrowse all questions from this exam

AD0-E103 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.

Show Answer
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

3 comments
Sign in to comment
pkg82
Jun 22, 2020

Answer is A

grios
Jul 10, 2020

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

chunpin
Jan 9, 2021

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