• Terminally Deprecated Elements
    Element
    Description
    This class does not offer enough flexibility and will be removed. Use FluentSynchronizer instead.
    When it was introduced years ago, the point of this method was to ensure the ServiceLoader call always used the classloader of the service class. At the time, this seemed to be important, even essential, so it was decided to ensure this "correct" usage.

    Fast-forward to 2025, this turned out to be harmful: in environments with layered classloaders like Quarkus, this limits the returned service implementations to those from library jars and omits those supplied by the application.

    For this reason, this method now uses the current thread's context classloader. Consequently, calling it is now equivalent to calling ServiceLoader.load(Class). Calls should therefore be replaced as this method is going to be removed.

  • Deprecated Methods
    Method
    Description
    When it was introduced years ago, the point of this method was to ensure the ServiceLoader call always used the classloader of the service class. At the time, this seemed to be important, even essential, so it was decided to ensure this "correct" usage.

    Fast-forward to 2025, this turned out to be harmful: in environments with layered classloaders like Quarkus, this limits the returned service implementations to those from library jars and omits those supplied by the application.

    For this reason, this method now uses the current thread's context classloader. Consequently, calling it is now equivalent to calling ServiceLoader.load(Class). Calls should therefore be replaced as this method is going to be removed.