I think he wants something like DS’s prototype scope in DependencyManager 4….. I don’t know if it’s available.
david jencks > On Aug 24, 2016, at 12:02 PM, Raymond Auge <[email protected]> wrote: > > On Wed, Aug 24, 2016 at 2:17 PM, mduduzik <[email protected] > <mailto:[email protected]>> wrote: > >> I would like to create and new instance of component for every service >> request. I believe by default a component is a singleton - i.e. the same >> instance will be returned for every service consumer request. In DS/SCR, >> this is accomplished by using a factory property in @Component declaration. >> > > Correction! That is done by using the prototype scope [1][2]. > > To do this outside of DS use a PrototypeServiceFactory [3] > > Sincerely, > - Ray > > [1] > https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/Component.html#scope() > > <https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/Component.html#scope()> > [2] > https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/ServiceScope.html#PROTOTYPE > > <https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/ServiceScope.html#PROTOTYPE> > [3] > https://osgi.org/javadoc/r6/core/org/osgi/framework/PrototypeServiceFactory.html > > <https://osgi.org/javadoc/r6/core/org/osgi/framework/PrototypeServiceFactory.html> > > > >> Thanks. >> -Mdu >> >> >> >> >> -- >> View this message in context: http://apache-felix.18485.x6. >> nabble.com/DM4-service-factory-multiple-service- >> instance-support-tp5018226.html >> Sent from the Apache Felix - Users mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile > <http://www.liferay.com/web/raymond.auge/profile>> > (@rotty3000) > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com > <http://www.liferay.com/>> > (@Liferay) > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org > <http://osgi.org/>> (@OSGiAlliance)

