You could do this by using a component factory. You would need another component to get the ComponentFactory service and call ComponentFactory.newInstance with the desired endpoint.framework.uuid service property.
But this is probably overkill for a single service. For a single service, you can use the life cycle methods of a component (activate/deactivate) to manually register/unregister the desired service.

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
----- Original message -----
From: Christian Schneider via osgi-dev <>
Sent by:
To: OSGi Developer Mail List <>
Subject: [osgi-dev] Can a DS component control its service properties programmatically?
Date: Tue, Feb 13, 2018 6:11 AM
I would like to create a component that is an remote service admin EndpointEventListener. 
So it needs a property endpoint.listener.scope with a filter string. 
The problem now is that I want this scope to only include endpoints from the local framework. So I need something like:
(endpoint.framework.uuid=<uuid of my framework>)
So I think I can not do this using the @Component annotation. Can I set this property in the @Activate method somehow?
Christian Schneider
Computer Scientist

OSGi Developer Mail List

Reply via email to