Re: Settings Service PID with FileInstall

2011-04-05 Thread Achim Nierbeck
Hi Guillaume, I'm still not convinced :) Since a file name is usually unique since we are talking of the combination of FileInstall and ConfigurationAdmin. In this case I'd say the factory.pid-service-pid pattern could be used. regards, Achim 2011/4/4 Guillaume Nodet gno...@gmail.com: @Achim:

Re: Settings Service PID with FileInstall

2011-04-05 Thread Guillaume Nodet
Fileinstall can monitor multiple directories, so you'd need the full path in order to have a unique id. And the ConfigurationAdmin API gives no way to set the PID anyway, so not sure how we could do that. The API only allow the creation of a new factory configuration given its factory PID or the

Re: Settings Service PID with FileInstall

2011-04-05 Thread Achim Nierbeck
Guillaume, you are right that if there are multiple directories watched you run into this issue. Never the less the ID still would be unique, just the stored data wouldn't which leads to quite a mess when looking for the reason :) Since the ConfigurationAdmin API doesn't give a way of adding

Re: Settings Service PID with FileInstall

2011-04-05 Thread Achim Nierbeck
oops, must have missed that :) 2011/4/5 Guillaume Nodet gno...@gmail.com: Yeah, I agree.  In Karaf, we've enhanced the config commands so that you can actually edit a configuration based on the zookeeper file it uses, so that should help too. On Tue, Apr 5, 2011 at 17:36, Achim Nierbeck

Re: Settings Service PID with FileInstall

2011-04-04 Thread Carlos Quiroz
Hi Thanks for the answer. I don't really get why there is this behavior. I get that if you don't have a PID ConfigAdmin should generate one but why not being able to specify one is kind of strange. For example with this behavior I cannot use the metatype which requires the PID be placed on

Re: Settings Service PID with FileInstall

2011-04-04 Thread Achim Nierbeck
Hi Guillaume, just because out of curiosity, where in the spec is it defined how the PID is generated? I just found the following in the current 4.2 spec: quote When a Configuration object for a Managed Service Factory is created (ConfigurationAdmin.createFactoryConfiguration), a new unique PID

Re: Settings Service PID with FileInstall

2011-04-04 Thread Guillaume Nodet
@Achim: This would not really guarantee a new unique PID if you can give it ... @Carlos: Not sure about the meta-type, but I suppose it should use the factory pid instead of factory based configurations? On Mon, Apr 4, 2011 at 22:59, Achim Nierbeck bcanh...@googlemail.com wrote: Hi Guillaume,

Re: Settings Service PID with FileInstall

2011-04-01 Thread Guillaume Nodet
The ConfigAdmin spec specifies that the PID has to be generated, so no, that's not possible. However you can filter based on the file name, as an additional property is added to the configuration to be able to easily link it back to the file. Look for the felix.fileinstall.filename property. On