Adobe AD0-E116 Practice Test - Questions Answers, Page 3

List of questions
Question 21

The following stack trace is written in the error.log file after installing a custom application package.
Could not start bundle com.adobe.cq.sample-bundle [526]. Reason: {}. Will retry. org.osgi.framework.BundleException: Unable to resolve com.adobe.cq.sample-bundle [526](R 526.0): missing requirement [com.adobe.cq.sample-bundle] osgi.wiring.package What are two different ways that the developer could resolve the OSGi bundle dependency error?
( Choose two )
Question 22

A developer creates an OSGi service to access JCR content. Refer to the code snippet from the OSGi service below. public class AccessRepository { private static final String SERVICE_ACCOUNT_IDENTIFIER = "sample-service"; ... private final String getServiceUser() { final Map<string, object=""> authInfo = Collections.singletonMap(ResourceResolverFactory.SUBSERVICE, (Object) SERVICE_ACCOUNT_IDENTIFIER); ResourceResolver serviceResolver = resourceResolverFactory.getServiceResourceResolver(authInfo))
Question 23

A Client-Side Library has the category "library.example".
Which HTL statement should a developer use to reference only the CSS files of this Client-Side library
Question 24

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?
Question 25

A developer creates a template-type for building editable templates.
The resulting editable templates and pages must always contain a specific layout container that can NOT be deleted by the author.
How should the developer meet this requirement?
Question 26

A developer creates a Sling Servlet. The Sling Servlet is bound to a path (/service/sling/sample).
Refer to the resulting code below.
@Component (immediate=true, service = {Servlet.class})
@SlingServletPaths(value = {"/service/sling/sample"})
What should the developer do to make the servlet access controlled using the default ACLs?
Question 27

Refer to the following Client Library node structure.
+ clientlibs
- jcr:primaryType="cq:ClientLibraryFolder"
- categories="[clientlibs.example]"
+ js.txt
- jcr:primaryType="nt:file"
+ css.txt
- jcr:primaryType="nt:file"
+ js
- jcr:primaryType="nt:folder"
- javascript1.js
- javascript2.js
The js.txt looks like javascript1.js javascript2.js The JavaScript is NOT present in the Client Library when it is loaded. What should a developer do to resolve this issue?
Question 28

A banking AEM application contains functionality to calculate a mortgage rate based on user input. A servlet in place calculates the result in the backend. A call to an internal third-party REST service is required to retrieve the average object value based on a given zip code. The following three service interfaces are used:
MortgageCalculationServlet, MortgageCalculationService and ObjectValueLookupRestService where MortgageCalculationServlet has a dependency to MortgageCalculationService and MortgageCalculationService has a dependency to ObjectValueLookupRestService.
The calculation has many combinations of input parameters and edge cases, so the JUnit coverage must be as high as possible.
Which two strategies should the developer use to ensure testability of the application code? (Choose two)
Question 29

A custom application contains a service component com.proj.ServiceComponent. A developer needs to configure the string value name and integer value intVal. The actual configuration must be deployed using a content package. What should the developer do to meet these requirements?
Question 30

What is not available in globel.jsp?
Question