Filter for component.name in declarative service definition [message #749725] |
Tue, 25 October 2011 07:50  |
Eclipse User |
|
|
|
Hello,
i have a declarative service that binds another service with a filter for the "component.name"
property via the target attribute.
The filter looks like this: (component.name=my.service.name)
This does not work as expected though: the according service is never bound.
The component.name property itself is present (of coursem, as it is added by the SCR) and filtering
for some custom property works as well.
Why does the target attribute not work for the component.name property?
Is this intended behavior or a bug?
Thanks,
Marcel
|
|
|
Re: Filter for component.name in declarative service definition [message #750507 is a reply to message #749725] |
Tue, 25 October 2011 16:31  |
Eclipse User |
|
|
|
In article <j8673b$ol0$1@news.eclipse.org>, Marcel.Hoetter@berner-
mattner.com says...
>
> Hello,
>
> i have a declarative service that binds another service with a filter for the "component.name"
> property via the target attribute.
> The filter looks like this: (component.name=my.service.name)
>
> This does not work as expected though: the according service is never bound.
> The component.name property itself is present (of coursem, as it is added by the SCR) and filtering
> for some custom property works as well.
>
> Why does the target attribute not work for the component.name property?
> Is this intended behavior or a bug?
>
> Thanks,
>
> Marcel
It works for us.
We are using Equinox 3.6.2.
In the XML file the reference element includes the attribute
target="(component.name=my.component.name)"
where my.component.name is the value from the name attribute of the
component element in the XML file for the referenced service.
I note that in your example you specified my.service.name as the target.
In our case, the interface name describing the service is not the same
as the component name.
Namaste, Bruce
|
|
|
Powered by
FUDForum. Page generated in 0.05966 seconds