List of questions
Related questions
Question 69 - AD0-E103 discussion
A custom AEM application contains a service component that needs to access the JCR repository within the activate method. The activate method uses ResourceResolverFactory.getServiceResourceResolver(…) without specifying a sub service name.
What should a developer do to make sure the user service mapping for the service component is available?
A.
Create a field of type ServiceUserMapped and annotate it with @Reference.
B.
Wait for the service ServiceUserMapper via BundleContext.getServiceReference(…).
C.
Create a field of type ServiceUserMapped and annotate it with @Reference using ReferencePolicy.DYNAMIC.
D.
Create a field of type ServiceUserMapper and annotate it with @Reference using ReferencePolicy.STATIC.
Your answer:
0 comments
Sorted by
Leave a comment first