ConfigurationService

I am using the ConfigurationService to define properties that modify the behavior of code I am contributing. One such property is enabled for a piece of functionality. If - at runtime - the code detects some downstream dependency is unavailable, I would like to set the property to disabled. E.g. the component can't complete a task, so it turns itself off. But the ConfigurationService only offers get functionality, not set functionality. I could override the ConfigurationService-provided values with Java a Property but that would necessitate first checking the Java Property then checking the ConfigurationService property. Is there is recommended best practice here?

0 votes

1 answers

1498 views

ANSWER



The ConfigurationService is designed to read configuration only, not to write it.

Writing configuration is fraught with peril. Consider what would happen in cluster, when there are several Nuxeo instances running; how would that work?

0 votes