Hi Nick,

I understand your change, my concern is that such kind of change could be applied to bunch of other configurations.

Let me take a look on that and see if it makes sense.

Regards
JB

On 09/16/2015 03:42 AM, Nick Baker wrote:
We’ve run into an issue with Karaf insisting on
the org.apache.karaf.features.cfg file being in etc/.

One of our products can be launched in several different configurations
from the same base installation, all concurrently.  These different
configurations necessitate different feature profiles.

We’ll eventually be moving away from featuresBoot and installing these
application features ourselves directly with the FeaturesService, as
part of our generic CapabilityManager, but we’ve run out of time for that.

So I tried to have the startup of of karaf add an extra configuration
directory appropriate for the launch profile. These configuration
directories contain only the org.apache.karaf.features.cfg file. The
plain /etc does not contain one. I thought for sure Karaf would be
loading from the ConfigurationAdmin, but It’s actually loading straight
from the properties file on disk by way of the ext:property-placeholder:

https://github.com/apache/karaf/blob/karaf-3.0.3/features/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml#L30

I’ve modified features-core to use the config admin and now our
application works as expected:
https://github.com/pentaho-nbaker/karaf-1/commit/6c88b575d40f2519012e35bb56b9f4effd2b5b60

-Nick

--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to