Class ConfigProviderResolverSync


  • public class ConfigProviderResolverSync
    extends org.eclipse.microprofile.config.spi.ConfigProviderResolver
    This class was created to resolve race condition, caused by independent parallel initialization of the server components, where some may init undesired automatical service lookup. That lookup should lead to this class, which will block all requests until this global resolver instance provided by the ConfigProviderResolver.instance() would be replaced by the HK2 service.

    The problem cannot be resolved by any other way, because Microprofile components use the global service mechanism, which is not capable to inject HK2 dependencies.

    Author:
    Patrik Dudits, David Matejcek
    • Constructor Detail

      • ConfigProviderResolverSync

        public ConfigProviderResolverSync()
        Logs the creation of this class on finest level.
    • Method Detail

      • getConfig

        public org.eclipse.microprofile.config.Config getConfig()
        Specified by:
        getConfig in class org.eclipse.microprofile.config.spi.ConfigProviderResolver
      • getConfig

        public org.eclipse.microprofile.config.Config getConfig​(ClassLoader loader)
        Specified by:
        getConfig in class org.eclipse.microprofile.config.spi.ConfigProviderResolver
      • getBuilder

        public org.eclipse.microprofile.config.spi.ConfigBuilder getBuilder()
        Specified by:
        getBuilder in class org.eclipse.microprofile.config.spi.ConfigProviderResolver
      • registerConfig

        public void registerConfig​(org.eclipse.microprofile.config.Config config,
                                   ClassLoader classLoader)
        Specified by:
        registerConfig in class org.eclipse.microprofile.config.spi.ConfigProviderResolver
      • releaseConfig

        public void releaseConfig​(org.eclipse.microprofile.config.Config config)
        Specified by:
        releaseConfig in class org.eclipse.microprofile.config.spi.ConfigProviderResolver