Interface ContextManagerProvider

  • public interface ContextManagerProvider

    A provider implementation supplied by the container, which creates and caches instances of ContextManager per class loader, which in turn create new instances of ManagedExecutor.Builder and ThreadContext.Builder.

    The container must register its ContextManagerProvider implementation via the register method, or by providing an implementation via the standard ServiceLoader mechanism.

    ContextManagerProvider implementations that wish to use the ServiceLoader registration mechanism must include a file of the following name and location in their jar:


    The content of the aforementioned file must be exactly one line, specifying the fully qualified name of a ContextManagerProvider implementation that is provided within the JAR file.

    If there is no manually registered ContextManagerProvider (via register(ContextManagerProvider)), any call to instance() will look up any ContextManagerProvider implementation via the aforementioned ServiceLoader mechanism. If there are more than one such implementation registered, the instance() method will throw an exception as documented