I’d be really amazed if this worked.  I imagine that DM is quite similar to DS, 
and you definitely can’t do that in DS, you have to use the scope rather than 
trying to write your own serviceFactory or PrototypeServiceFactory.  If your 
service is e.g. ServiceFactory that’s what you’ll get when you look up the 
service, not the service it’s a factory for.  DS already registers a 
ServiceFactory for each component.

Hopefully someone who actually knows something about DM will speak up soon :-)

david jencks

> On Aug 24, 2016, at 5:54 PM, Raymond Auge <[email protected]> wrote:
> 
> I'm fairly certain that DM supports publishing services of any type and
> doesn't care about scoping, including implementations of
> PrototypeServiceFactory.
> 
> Mdu, your service simply needs to implement PrototypeServiceFactory and you
> should be able to use the DM's imperative API as usual.
> 
> But any other DM experts may correct me if this is wrong.
> 
> - Ray
> 
> On Wed, Aug 24, 2016 at 3:13 PM, mduduzik <[email protected]> wrote:
> 
>> Ray/David,
>> Thanks for your prompt responses. I would like to accomplish this using
>> API/Activator approach in DM4 (Felix Dependency Manager 4). Here's the
>> context within which I would like to do this:
>> 
>> public class Activator extends DependencyActivatorBase {
>>        @Override
>>        public void init(BundleContext ctx, DependencyManager dm) throws
>> Exception
>> {
>>        }
>> }
>> 
>> So in other words, a non-Annotation based approach. I hope my request is
>> clearer.
>> 
>> Regards.
>> -Mdu
>> 
>> 
>> 
>> --
>> View this message in context: http://apache-felix.18485.x6.
>> nabble.com/DM4-service-factory-multiple-service-instance-support-
>> tp5018226p5018230.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>
> (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
> (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to