How to share a configuration across multiple bundles in AEM6.4
Hello,
I have multiples OSGi bundles that use the same configuration properties. Now I create a below service for each bundle:
@ObjectClassDefinition(name = "My configuration service", description = "Configuration for bundle")
public @interface MyConfig {
@AttributeDefinition(name = "My API:", description = "API endpoint for project", type = AttributeType.STRING)
String myPropAPI() default "....";
...
}
@580286
protected void activate(final MyConfig config) {
this.api_endpoint = this.config.myPropAPI();
}
Is it possible for other bundles to share this configuration service? Or should I create a property file accessed directly by all bundles?
Thanks for any input