Hi there.
Java Config JSR came out quite huge.
Which does make me wonder a bit, why it's very silent here?
Are there other places we should follow if we are interested? Even if it is to be a critical voice.
But that aside.
It is my sincere believe that this intent is a good thing. However just as Nicolas states in his blog post and I did in mine somehow, we should be very wary of imposing rules that lay outside of the real application scope.
We have application servers providing all sorts of configuration to an application, but we have no thing that defines how different environments should provide configurational stuff to an application. Which is in my humble opinion not something we need.
In every place I worked, which have been a couple in the last 10 years as consultant (7 to be exactly, on different projects, all as consultant), they have different means to have different kind of environmental dependent parameters. I found this to be so specific for every project and company that it's hard to find 'one method to rule them all'. That's why also believe that it's a bad idea to put much effort in this. However I'm open to convincing and hope you can let me see the light and purpose of it
In my humble opinion it would however perhaps be a better idea to invest in something that can reload properties on the fly from a given resource ( property file or .... ) A bit inspired by Springs @Value and JRebel live reloading. If you're JVM would then be smart enough to know where the property came from. Meaning an SPI for this would be available or even an implementation that would be a great addition to Java.
Auto reloading of configuration values. Anywhere.. now that is a thing that would benefit most of applications I know. And I consider more a config thing then defining when and how a file should be named/reloaded
I know many applications where we have wrapped this kind of things to achieve on the fly reloading for values. As a matter of facts, lately, I tend to do this for any thing that can be configured programmatic, either by property config or JMX. A cumbersome thing, always the same. Would be great to have a standard.
But perhaps the above is not really a config-jsr thing..
Kind Regards
Balder