Which of the following options is recommended?

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)
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")
D. @Component(service = ConfigurationFactory.class) @Designate(ocd = ConfigurationFactorylmpl.Config.class, factory=true)

Answer: D

Explanation:

The @Component(service = ConfigurationFactory.class) @Designate(ocd = ConfigurationFactorylmpl.Config.class,factory=true) option is recommended for creating a multi-tenancy 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/osgi-configuration-settings.html?lang=en#creating-factory-configurations

Latest AD0-E134 Dumps Valid Version with 50 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments