Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » LDAP Filter using Declarative Services
LDAP Filter using Declarative Services [message #94733] Fri, 10 August 2007 17:19 Go to next message
Eclipse UserFriend
Originally posted by: volivierv.free.fr

Dear,

I am trying Declarative Services. I am using the version of DS available
on the CVS server.
I meet a problem with a LDAP filter put in the target.

For instance I have declared a hello component as a factory:
<component name="HelloServiceComponent" factory="hello.component.factory">
<service>
<provide interface="simple.service.HelloService">
</service>
<property name="nom" value="skywalker"/>
<property name="prenom" value="luc"/>
</component>

Another require this factory:
like this :
<reference
name="ComponentFacto"
interface="org.osgi.service.component.ComponentFactory"
bind="setFactory"
unbind="unsetFactory"
target="(&(nom=skywalker)(prenom=luc))"
/>

The bind never happens...
If I replace the target with (|(nom=skywalker)(prenom=luc)) it works.
It looks as if '&' is not understood...

I also tried to find out the factory directly using the
getAllServiceReferences("org.osgi.service.component.ComponentFactory ","(&(nom=skywalker)(prenom=luc))")
and I managed to find it so the LDAP filter seems to work...

Could you help me to understand the problem please?
Thanks by advance.

Olivier
Re: LDAP Filter using Declarative Services [message #94749 is a reply to message #94733] Sun, 12 August 2007 11:14 Go to previous message
Eclipse UserFriend
Originally posted by: volivierv.free.Fr

It was a dummy question.
I forgot that & was an XML forbidden character.
So instead of :
target="(&(nom=skywalker)(prenom=luc))"

I should have written:
target="(&amp;(nom=skywalker)(prenom=luc))"

What a shame that the & character is also the one chosen for LDAP
Filters...

Olivier
Previous Topic:Extensions & Services
Next Topic:Modal Popup/ToolTipText/Infopop?
Goto Forum:
  


Current Time: Tue Apr 16 20:59:06 GMT 2024

Powered by FUDForum. Page generated in 0.28005 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top