ExamGecko
Question list
Search
Search

Related questions











Question 9 - AD0-E134 discussion

Report
Export

An AEM application wants to set up multi-tenancy using Adobe-recommended best practices and bind multiple configurations to it. Which of the following options is recommended?

A.
import org.apache.felix.scr.annotations.Component; @Component(label = "My configuration", metatype = true, factory= true)
Answers
A.
import org.apache.felix.scr.annotations.Component; @Component(label = "My configuration", metatype = true, factory= true)
B.
import org.osgi.service.component.annotations.Component; @Component(service = ConfigurationFactory.class)
Answers
B.
import org.osgi.service.component.annotations.Component; @Component(service = ConfigurationFactory.class)
C.
import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition; @ObjectClassDefinition(name = "My configuration")
Answers
C.
import org.osgi.service.metatype.annotations.AttributeDefinition; import org.osgi.service.metatype.annotations.ObjectClassDefinition; @ObjectClassDefinition(name = "My configuration")
D.
@Component(service = ConfigurationFactory.class) @Designate(ocd = ConfigurationFactorylmpl.Config.class, factory=true)
Answers
D.
@Component(service = ConfigurationFactory.class) @Designate(ocd = ConfigurationFactorylmpl.Config.class, factory=true)
Suggested answer: D

Explanation:

The @Component(service = ConfigurationFactory.class) @Designate(ocd = ConfigurationFactorylmpl.Config.class,factory=true) option is recommended for creating a multitenancy configuration and binding multiple configurations to it. This option uses the OSGi R6 annotations to define a component that provides a service of type ConfigurationFactory and designates a class that contains the configuration properties. The factory=true attribute indicates that multiple configurations can be created for this component. Reference:

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/osgiconfiguration- settings.html?lang=en#creating-factory-configurations

asked 02/10/2024
Adam Burdett
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first