Exam 9A0-384 All QuestionsBrowse all questions from this exam
Question 36

Which is avalid way of creating an OSGI service?

    Correct Answer: C

    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
heenamadanOption: C

Ans is C

starcitynews0023Option: C

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

starcitynews0023Option: C

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