Hello,

This is news for me too. I’m still working with Karaf 2.3.x, and there the 
Factory PID is indeed the part before the dash. This holds equally for files as 
for configurations in features.

So in Karaf 3 feature configurations, the part before the dash does not play a 
role at all? But for configuration files in the deploy folder it does? This 
seems weird/confusing to me.

Regards,
Benjamin





From: Achim Nierbeck [mailto:[email protected]]
Sent: Mittwoch, 2. Juli 2014 08:52
To: [email protected]
Subject: Re: Problems With Factory Configurations In Karaf 3.0.1

Maybe I've answered to quick ;)

Yes indeed the part after the "-" is the factory pid part.
Though, this is also a generated ID by the ConfigurationAdmin Service.
With the config-files in etc though there is a "binding" between
foo.bar-encrypted.cfg and foo.bar-randomID from the Configuration.
If you do a config:list on the Karaf 2.3.x line you'll also see this kind of 
pattern for ManagedServiceFactories.
You also will notice a field that you didn't configure yourself but which is 
passed along through the FileInstaller service, that one binds the 
configuration back to the file. So if you update a configuration via command or 
any other means of using the ConfigurationAdmin service it will be persisted 
back to the config file through the FileInstaller (or used to, but that's some 
time ago, so maybe it's the ConfigAdmin service now)

So basically, everything is working as designed ;)

regards, Achim




2014-07-02 7:01 GMT+02:00 Gareth 
<[email protected]<mailto:[email protected]>>:
Hello Achim,

Thanks for the quick response!

I am confused. I understood that if I created a file foo.bar-encrypted.cfg
in the etc directory a configuration would be created for factory pid
foo.bar. Similarly if I created a configuration like this in a feature file:

<config name="foo.bar-encrypted">
.
.
</config>

I thought a configuration for factory pid foo.bar would also be created.
Have I misunderstood something here? This is the behaviour I saw in karaf
2.3...which doesn't seem to be the case now (at least for adding the
configuration for the feature files). Now it is thinking the part after the
"-" is the factory pid.

thanks,
Gareth



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Problems-With-Factory-Configurations-In-Karaf-3-0-1-tp4033921p4033928.html
Sent from the Karaf - User mailing list archive at Nabble.com.



--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & 
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to