AEM 6.3 Migration - how do I handle configurationFactory in DS annotations?

1.2k views Asked by At

I have a Component that uses SCR annotation with configurationFactory set true & I an using a Factory to manage its instances

@Reference(
  name = SocialCollaborationServiceFactoryImpl.TRINAING_SERVICE_NAME,
  referenceInterface = SocialCollaboration.class,
  policy = ReferencePolicy.DYNAMIC,
  cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE)

This allows multiple instances to be created from the Felix console config manager automatically by clicking a plus sign next to the configuration name and my factory can track it. Now while migrating to AEM 6.3 I am unable to set the configuration factory property to component.This @Component(property={"conifugrationFactory=true}") of course does not work.

Any help here to documentation references or suggestions will help

1

There are 1 answers

0
awd On BEST ANSWER

Assuming you are using osgi annotations and not felix scr annotations with 6.3, you should be able to use @Designate(factory=true). see this for a reference implementation.