As I work in more environments now that want to use microservices the
limitations of the blueprint properties mechanics become a bit hairier.  I
commonly find that I have bundles that have common properties shared across
them and I can't find a good solution other than creating my own OSGi
service for serving them up for such crosscutting concerns.

I'm not an expert on the specification and implementations of compendium or
blueprint libraries so don't know how feasible something like this would be
but I would find the following terribly useful.

A properties hierarchy much like Maven that permits you to specify a parent
that you inherit from and then can add to or override.

com.foo.parent.cfg
com.foo.child.cfg

The child cfg file might have a #! directive at the top specifying
com.foo.parent PID. And if another one was

com.foo.grandchild.cfg

it might specify com.foo.child as its parent.  Then the CM would load
parent, override it with child and finally override that grahdchild.

Yes, I'd still have to specify

<cm:property-placeholder persistent-id="com.foo.granchild"
update-strategy="reload">

in my bundle and that would still be bound to that single bundle but this
could alleviate the need for replication of properties across a lot of
bundles.

Technically that is all rather straightforward but I'm not sure how well
that would align with the specifications or goals of CM.

Brad

Reply via email to