jnosql icon indicating copy to clipboard operation
jnosql copied to clipboard

Add a ConfigurationProvider

Open otaviojava opened this issue 8 years ago • 1 comments

This proposal covers one way to load a Configuration implementation using ServiceLoader. The Configuration project has three types:

  • Column ConfigurationProvider
  • Document ConfigurationProvider
  • Key-Value ConfigurationProvider

Eg;

  ColumnConfiguration<DriverA> configuration =  ColumnConfigurationProvider.getConfiguration();

When the application has either when not ConfigurationProvider in the classloader or when more than one ConfigurationProvider will launch an exception. However, we must add a method to solve this ambiguous exception, when there is more than one ConfigurationProvider in the classloader.

Eg:

DriverConfiguration configuration =  ColumnConfigurationProvider.getConfiguration(DriverConfiguration.class);

otaviojava avatar Jul 16 '17 23:07 otaviojava

Happy to help with that given I worked a lot on the JSR 363 SPI using ServiceLoader, too.

keilw avatar Jul 17 '17 07:07 keilw