Q ) 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 be done to make sure the user service mapping for the service component is available?
- A. Create a field of type ServiceUserMapped and annotate it with @3214626.
- B. Wait for the service ServiceUserMapper via BundleContext.getServiceReference().
- C. Create a field of type ServiceUserMapped and annotate it with @3214626 using ReferencePolicy.DYNAMIC.
- D. Create a field of type ServiceUserMapper and annotate it with @3214626 using ReferencePolicy.STATIC.