I meant that I would not bother to optimize the case of a singleton service. In 
rare cases (nowadays most services are service factories since DS and Blueprint 
mandate this) that you have a singleton you might save one or two objects ... 
hardly seems to be worth the effort to optimize?

Kind regards,

        Peter Kriens

On 20 aug. 2013, at 10:13, Peter Kriens wrote:

> Keep it simple ... the overhead of an extra proxy object seems absolutely 
> minimal for the complexity you create ...
> 
> Kind regards,
> 
>       Peter Kriens
> 
> 
> On 19 aug. 2013, at 23:08, David Bosschaert wrote:
> 
>> I need to proxy a service in the service registry. If I knew that the 
>> service was a singleton, I would only have to create a single proxy. 
>> 
>> I guess the only solution in R5 I have is to assume that every service is a 
>> factory and thus create a separate proxy for each client bundle...
>> 
>> Any better ideas?
>> 
>> Cheers,
>> 
>> David
>> 
>> 
>> On 19 August 2013 21:44, Thomas Watson <[email protected]> wrote:
>> I don't see any way this can be accomplished outside of using the R6 service 
>> scopes.  Perhaps if we knew the reason you need to know this information 
>> then we could come up with a different solution on R5.
>> 
>> Tom
>> 
>> 
>> 
>> <graycol.gif>David Bosschaert ---08/19/2013 01:10:30 PM---Hi all, Is there a 
>> way to find out in OSGi Core R5 in a Service Registry Hook
>> 
>> From:        David Bosschaert <[email protected]>
>> To:  OSGi Developer Mail List <[email protected]>, 
>> Date:        08/19/2013 01:10 PM
>> Subject:     [osgi-dev] Can I find out in a Service Registry Hook that the 
>> service is implemented via a Service Factory?
>> Sent by:     [email protected]
>> 
>> 
>> 
>> Hi all,
>> 
>> Is there a way to find out in OSGi Core R5 in a Service Registry Hook 
>> (EventListenerHook or FindHook) whether the Service Reference represents a 
>> Service Factory?
>> 
>> I guess in R6 I can read this off the service.scope property, but is there 
>> any way in R4.3/R5 to figure this out?
>> 
>> Cheers,
>> 
>> David_______________________________________________
>> 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
>> 
>> _______________________________________________
>> 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

Reply via email to