Uses the service-provider loading facilities, defined by the ServiceLoader class, to attempt to locate and load an implementation of the service...
... which isn't the case here.
load an implementation of the service
Carey Brown wrote:A possible approach is to have the MessageTemplet class get its values from a properties file.
Tim Cooke wrote:the requirement is to (build in a feature switch that will) enable us to configure whether it uses v1 or v2 of the MessageTemplate.
...The straight forward way to implement it isn't great for performance.
Because the properties don't live in a properties file. These MessageTemplate classes are a lot like a properties file, but just in the form of a class. I don't know why this is so but these are the cards I've been dealt so have to roll with it.
Carey Brown wrote:... why not just get the values directly from the properties file?
Tim Cooke wrote:The only compromise I had to make was that I could no longer declare the static fields as final because the values are assigned later in the static block.
I'm gonna teach you a lesson! Start by looking at this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your databasehttps://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database