Hi,

I think that you also have a bit of a misunderstanding about what a factory pid 
is.

> Given a factory pid of a.b.c, and a pid of q, I am a little
> disoriented about how to manage some properties

This doesn’t really make sense, you can have a factory pid of a.b.c, but the 
pid for a factory configuration isn’t user configurable.

> Felix fileinstall parses a.b.c-q as 'pid = a.b.c', factoryPid = 'q'.
> It calls createFactoryConfiguration for ‘a.b.c', and ignores the q.

File install doesn’t parse quite like that. File Install looks for files called 
xxx.cfg. If xxx contains a ‘-‘ character then the configuration is a factory 
configuration, and is split into the section before the ‘-‘ and after the ‘-‘. 
The section before is the factory pid, the section after is used by File 
Install as an identifier (literally inserted as a value in the configuration).

> The 'updated' method on the service is called on a pid like
> 'a.b.c.UNIQUE-STRING'.
> 
> Do I need to add something to the properties so that the pid remains 
> 'a.b.c-q'?


No, this is not possible. Configuration Admin decides on the pid, not you.

> As it is, I'm failing to use a second call to configuration admin to
> update one of the properties.

I’m assuming that you can’t (or don’t want to) update the file on disk, so 
instead you should be listing the configurations, filtering for the one that 
you want.

configAdmin.listConfigurations(“(&(service.factoryPid=factoryPid)(some.key=some.value))”);

You can then update the configuration from there. You can ask the File Install 
guys for their magic property name if you want, or you can use some other known 
property.

Regards,

Tim

> On 21 Nov 2016, at 18:34, Benson Margulies <[email protected]> wrote:
> 
> Given a factory pid of a.b.c, and a pid of q, I am a little
> disoriented about how to manage some properties.
> 
> Felix fileinstall parses a.b.c-q as 'pid = a.b.c', factoryPid = 'q'.
> It calls createFactoryConfiguration for 'a.b.c', and ignores the q.
> 
> The 'updated' method on the service is called on a pid like
> 'a.b.c.UNIQUE-STRING'.
> 
> Do I need to add something to the properties so that the pid remains 
> 'a.b.c-q'?
> 
> As it is, I'm failing to use a second call to configuration admin to
> update one of the properties.
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to