Thank you all.
Special thanks to Carsten - that was exactly I was searching for.

My reference looks now like this:
    @Reference(policyOption = ReferencePolicyOption.GREEDY, collectionType = 
    private volatile List<Map.Entry<Map<String, Object>, ISecurityChecker>> 

As you said, I am getting a Map.Entry that contains the which is - 
in my case - "my.config~system1".
I am filtering based on Ray's code snippet for the right configuration: 
            Filter filter = 
FrameworkUtil.createFilter("("+ repoName + ")");
            ISecurityChecker securityChecker = -> 

I am probably building a small wrapper handles all the configuration instances 
as I have several rest endpoints which do all the same security check.

Big Thanks!

-----Ursprüngliche Nachricht-----
Von: Carsten Ziegeler <> 
Gesendet: Montag, 6. August 2018 17:21
An:; Cristiano <>; Philipp Höfler 
Betreff: Re: Configurator R7 example

I think the current @Component annotation is correct :) (sorry)

If you use factory="..." you will create a component factory as defined in the 
DS specification - that's in contrast to a component managed by factory 
configurations (which this example is about).

If you managed to get the Map of properties (which should work with the 
Map.Entry change I posted recently), then the full PID of the configuration is 
stored in a property named "" - you can then search for the tilde in 
there and get what you want.



Cristiano Gavião wrote
> On 06/08/2018 11:10, Philipp Höfler wrote:
>> Sorry, pid is probably the wrong word for that. Alias might be more 
>> correct.
>> I am talking about the name after the ~ in the configuration file 
>> (my.config~system1).
>> In this case I would like to get "system1".
> Ah, now I understood.
> I think you won't get that since your component is not a factory.  If 
> I'm remember right, you need to use a FPID (factory pid), so your 
> component must be declared this 
> way:*@Component(factory="anFactoryPID")*
> Couple years ago, I used to use the ConfigAdmin directly to activate 
> my mult-instance components and the information you want was only 
> provided by the Configuration object returned from CM:
>> configuration = getConfigurationAdmin()
>>                     .createFactoryConfiguration(pFactoryPid, null); 
>> factoryPID = configuration.getFactoryPid(); pid = 
>> configuration.getPid()
> I just started with Configurator too, but I don't know if this FPID 
> and PID information are being published in the configuration map 
> currently also. CM used not do that until R6 (at least I was not able to find 
> them).
Carsten Ziegeler
Adobe Research Switzerland

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to