> From: Raymond Auge <raymond.a...@liferay.com>

> On Mon, Mar 30, 2015 at 2:41 PM, BJ Hargrave <hargr...@us.ibm.com> 
wrote:
> > From: Raymond Auge <raymond.a...@liferay.com> 
> 
> > K, so it can't handled Object (or the anything case)? 
> 
> DS can handle any type a service is registered under including 
> java.lang.Object. But it does require you tell DS the service type 
> (either in the interface element if you write the XML or in the 
> service element of the Reference annotation which can be inferred 
> from the first argument of the annotated bind method) and for the 
> service to be registered under that type. 
> 
> What DS cannot handle is a reference to a service with an 
> unspecified name. You seem to want to bind to any service whose name
> endsWith MBean (except for DynamicMBean). And DS is not designed to 
> do that. That is better for a ServiceTracker.
> 
> It was my _hope_ that most things you could do with a service 
> tracker you could do with a DS's bind method.

You can do most things. Probably 80-90% of the things most people want to 
do with services. But we know DS does not cover 100% of the use cases. And 
what you want to do falls outside what DS was designed to do.

> ultimately doesn't a DS component use a service tracker?

I don't think any DS impl uses a service tracker internally. And even if 
it does, that service tracker would be parameterized by the component 
description which requires the interface XML attribute specify the 
objectClass of the referenced service. 

> Anyway.. not arguing.. moving on...

:-)

-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargr...@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to