Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jnosql-dev] Add a ConfigurationProvider

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);

Ref: https://github.com/eclipse/jnosql-diana/issues/96
--
Otávio Gonçalves de Santana

Back to the top