XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • Blocker
    • 6.1.0.Alpha1, 6.1.0.Final
    • None
    • None
    • None

    Description

      Section 4.1.2 of the Jakarta RESTful Web Services specification requires the certain types to be discovered and registered unless the property jakarta.ws.rs.loadServices is set to false.

      On runtime initialization, an implementation MUST discover and register certain service providers in jakarta.ws.rs.core.Configuration runtime configurations, if and only if service loading is enabled. Service loading is enabled, except when there is an Application subclass whose getProperties method returns a map which contains the key jakarta.ws.rs.loadServices with a value of Boolean.FALSE. For each service X, where X is jakarta.ws.rs.core.Feature or jakarta.ws.rs.container.DynamicFeature, the set of providers to be registered MUST be determined as follows:

      • first, register all providers discovered with ServiceLoader.load(X.class)
      • additionally, register all providers discovered with ServiceLoader.load(X.class, X.class.getClassLoader())

      Note that service loading allows libraries to be self-sufficient: it allows them to register what they need with the JAX-RS implementation without intervention from the application. From the viewpoint of an application developer, this means that they do not need to understand the inner workings of their dependent libraries when overriding getClasses. As another example, it allows system integrators to extend the JAX-RS implementation (e.g. to provide integrations with other Jakarta EE specifications) in a completely portable manner.

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              jperkins-rhn James Perkins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: