Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Filter for component.name in declarative service definition
Filter for component.name in declarative service definition [message #749725] Tue, 25 October 2011 07:50 Go to next message
Marcel Hoetter is currently offline Marcel Hoetter
Messages: 28
Registered: July 2009
Junior Member
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 Go to previous message
Bruce Kelly is currently offline Bruce Kelly
Messages: 63
Registered: July 2009
Member
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
Previous Topic:eclipse on HP-UX crash - Why p2 profile gz files getting generated?
Next Topic:Eclipse p2 Update Issue
Goto Forum:
  


Current Time: Thu Jul 24 19:14:55 EDT 2014

Powered by FUDForum. Page generated in 0.01599 seconds