Hi, On 11.03.2010 13:30, Philipp Kursawe wrote: > Hello, > > someone out there that can explain me how the ConfigAdmin and DS > Component Factories work together? > > I was under the impression that each factory configuration created > will invoke the newInstance method of the DS component factory? > > Or do I have to create the instances myself programmatically? > What properties have to be set in the factory configuration to provoke > a creation of a new instance with that factory? Do I need to set the > service.factoryPid to the id of the factory?
As Neil said, you cannot use factory configurations to create component factory instances. But you can use factory configurations (instead of regular, singleton configurations) to create component instances. For example (based in DS 1.1 in R4.2): Create a component with configuration-policy=required. Then craete factory configurations whose factoryPID matches the component's name. It doesn't matter whether the component is an immediated, a delayed or a Service Factory component; as long as it is not a Component Factory component this works. Regards Felix > > There seem to be no tutorials out there when or how to use the DS > component factory. Only for the deprecated (?) ManagedServiceFactory. > > Thanks, > Phil > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
