9A0-384 Exam QuestionsBrowse all questions from this exam

9A0-384 Exam - Question 36


Which is avalid way of creating an OSGI service?

Show Answer
Correct Answer: AC

The valid way of creating an OSGI service is to use both the @Component and @Service annotations. This approach correctly defines the class as a component and service in the OSGI framework, which the other options do not. The correct implementation should involve the OSGI annotations, ensuring that the class, MyServiceImpl, is properly recognized and registered as a service.

Discussion

3 comments
Sign in to comment
starcitynews0023Option: C
May 2, 2020

C. ©Component ©Service class MyServiceImpl extends MyService the new way is @compone(service="myService") public class MyServiceImpll implements MyService {}

starcitynews0023Option: C
May 2, 2020

C. ©Component ©Service class MyServiceImpl extends MyService the new way is @compone(service=MyService.class) public class MyServiceImpll implements MyService {}

heenamadanOption: C
Jun 17, 2020

Ans is C