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
import org.osgi.service.component.annotations.Component;
import org.osgi.service.metatype.annotations.Designate;
@Component(service = ConfigurationFactory.class)
@Designate(ocd = ConfigurationFactorylmpl.Config.class, factory=true)
Show Answer