It looks like part of the problem is that the ComponentFactoryImpl
doesn't look at the target service properties for some reason so it
accepts services even if the target doesn't match.  When the component
instance is created, the ComponentFactoryNewInstance does check the
target properties so the instantiation fails.

I think this is a bug.

David Humeniuk

-----Original Message-----
From: david.humen...@l-3com.com [mailto:david.humen...@l-3com.com] 
Sent: Friday, August 26, 2011 3:33 PM
To: users@felix.apache.org
Subject: Declarative Services, determining reference satisfaction with
target services

I have a factory component (call it ComponentA) with a service reference
(call it X).  The service reference X has an interface of Y and a target
of "(name=Z)"

 

If a service is registered with an interface of Y, but a name service
property of something other than Z, I would expect the service reference
X to not be satisfied.  However, using Felix SCR, I'm seeing that the
reference is satisfied.  When I go to create an instance with the
factory, I then get a ComponentException saying the dependency is not
satisfied.

 

David Humeniuk

Software Engineer

L-3 Nova Engineering

4393 Digital Way

Mason, Ohio 45040

513-204-7628 (Direct)

513-204-7600 (Main)

513-204-8999 (Main Fax)

www.L-3com.com/Nova

 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to