Exam AD0-E103 All QuestionsBrowse all questions from this exam
Question 55

A developer creates an OSGi service to access JCR content. Refer to the code snippet from the OSGi service below.

Bundle ID = com.adobe.aem.samples-bundle

Which set of steps should the developer take to make sure that the code works?

    Correct Answer: D

    To ensure that the code works, the correct steps are to create a System User with appropriate ACLs and modify the Apache Sling Service User Mapper Service Amendment by setting the user.mapping property. The use of a System User is required, and the Service User Mapper Service Amendment is the appropriate configuration point to map the service user. Hence, the correct steps are to create a System User called systemUser, modify the Apache Sling Service User Mapper Service Amendment, and set user.mapping to com.adobe.aem.samples-bundle:sample-service=systemUser.

Discussion
heenamadanOption: D

Ans is D

chunpinOption: D

Answer: D Reference: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/apache-sling-service-user-mapper-service-amendment-configuring/qaq-p/232419

chat_cOption: D

C seems to be wrong because it says set user.default, but should be user.mapping, which is for ...Amended, So D should be correct

chat_c

Sorry I think A is correct, as A uses service user, whereas C uses user.default and D uses system user, so C & D would be wrong.

chat_c

Apologies for confusions, D is correct as it has to be system user.

chat_cOption: C

C is correct. here ref: https://stackoverflow.com/questions/31350548/resourceresolverfactory-getserviceresourceresolver-throws-exception-in-aem-6-1/31394583#31394583

chat_c

Sorry I think A is correct, as A uses service user, whereas C uses user.default and D uses system user, so C & D would be wrong.

chat_c

Apologies for confusions, D is correct as it has to be system user.

Rafael1016Option: D

D this is the prove https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/apache-sling-service-user-mapper-service-amendment-configuring/qaq-p/232419

kasyap1125Option: D

Correct answer is D

gkay2Option: C

Correct answer is C

niiraleyOption: C

Correct -C Catch is here "Modify"- In case of Amendment , need to create new mapper hence removes option D. A and B is wrong.

pkg82Option: C

A is not correct. You must create system user. C should be the correct answer.