> If creating a configuration and then not setting any properties is a
> no op, then maybe my assumptions above our incorrect.  So does the 
> following not really work:
> 
> ConfigurationAdmin ca = …
> String factoryPid = …
> String pid = ca.createFactoryConfiguration(factoryPid).getPid();
> 
> …
> 
> // now try to change the config, but will this return a new config 
> that isn’t associated with the factory
> Configuration config = ca.getConfigurtion(pid);
> config.getFactoryPid(); // is this going to be null?
> config.update(props);
> 
> Are you saying I must use the Configuration object returned from 
> “createFactoryConfiguration” and can’t call “getConfiguration”? 
> Does a configuration object not exist (exist as defined by the 
> description of “getConfiguration”) until properties are set?
> 

I am not sure how well that will work. It probably depends upon the time 
between the execution of the two sections of code. For example, is the 
ConfigurationAdmin impl bundle restarted?

I also don't really see the point in doing that either. You have to pass 
the pid created in the first section of code to the second section of 
code. Either pass the Configuration object or create the factory 
configuration object in the second piece of code.


-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargr...@us.ibm.com

office: +1 386 848 1781
mobile: +1 386 848 3788

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to