Hi,
Currently, I think there is no filtering option in automatic feature
loading over osgi services.
I think it's nicer and safer to have some kind of filtering mechanism.
I am thinking of not just the enable/disable boolean flag, but a regex
filter to match against the service-publishing bundle's symbolic names
and feature names.
Cocretely, we define bus properties that look something like,
bus.feature.osgi.load.allowFeatures
bus.feature.osgi.load.denyFeatures
bus.feature.osgi.load.allowBundles
bus.feature.osgi.load.denyBundles
each taking a regex string.
and writing in a pseudo-code,
given
f = feature
bsn = bundleSymbolicName
fn = featureName
we use the condition
if (match(allowBundles, bn) && !match(allowBundles, bn)
&& match(allowFeatures, fn) && !match(denyFeatures, fn)) {
add(f)
}
or use a simpler rule with only the bundle name check part.
Do you have comments or preferences?
Thanks.
regards, aki