Hi, Andrey.
The approach of setting plugins via IgniteConfiguration provides an
additional feature to control the order in which plugins will be loaded.
It's important in the case when several plugins provide different
implementations of the same GridComponent while providing some other
unique implementations (now the first found plugin that provides
required component will be used for its obtaining).
The ServiceLoader approach gives no mentioned above order guarantees.
So I think that we can't mix these two approaches.
Also, it's not clear for me -- are there any reasons to continue support
of the ServiceLoader approach, given the fact that configurations needed
for a plugin, in this case, are also specified via IgniteConfiguration?
Moreover, why someone should mix those approaches?
On 05.02.2020 17:35, Andrey Gura wrote:
Anton, Mikhail,
I stumbled upon impossibility to configure plugin with out adding
appropriate class names to org.apache.ignite.plugin.PluginProvider
file and found change where this possibility was added [1].
Thanks a lot for this change. I noticed also that
IgniteConfiguration.setPluginProviders() overrides plugins that
usually will be loaded by ServiceLoader. Is it deliberate decision? It
seems that better approach is using plugins from both sources:
ServiceLoader provided and user provided via IgniteConfiguration.
WDYT?
[1] https://issues.apache.org/jira/browse/IGNITE-11744