I have a features file that deploys and configures a large modular
application. Some of the modules are non-Java code wrapped in OSGi
bundles, so part of the configuration is establishing communication
between modules. Since each bundle has its own configuration and the
communication configuration crosses multiple bundle configurations,
there is the possibility of error by changing one configuration but
not the other(s). Are there any "cross-configuration variables" in a
features file that would eliminate these errors?
I read in the documentation[1] that something like this can be done
with Spring-DM (which I don't know or use) but I didn't see anything
for non-Spring-DM users. I'm thinking of something like the
following:
<features name="exampleRepo">
<feature name="app" version="1.0.0">
<!-- Define "cross-configuration variables" here. -->
<variables>
port = 1234
</variables>
<bundle>mvn:com.foo.app/com.foo.app.producer/1.0.0</bundle>
<config name="com.foo.app.producer">
outputPort = ${port} <!-- Karaf substitutes the value here. -->
</config>
<bundle>mvn:com.foo.app/com.foo.app.consumer/1.0.0</bundle>
<config name="com.foo.app.consumer">
inputPort = ${port} <!-- Karaf substitutes the value here. -->
</config>
</feature>
</features>
Thanks,
Tim
1.
http://karaf.apache.org/manual/latest-2.2.x/users-guide/provisioning.html#Configurations
"There may also be cases where ..."
--
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road \ /
Sarasota, FL 34232 .________\(O)/________.
(941) 377-6775 x208 ' ' O(.)O ' '