Section 11.2.3 of the Jakarta REST Spec requires that applications, providers and resources should have a default CDI scope.
In a product that supports CDI, implementations MUST support the use of CDI-style Beans as root resource classes, providers and Application subclasses. Providers and Application subclasses MUST be singletons or use application scope.
For example, assuming CDI is enabled via the inclusion of a beans.xml file, a CDI-style bean that can be defined as a JAX-RS resource as follows:
Previously this was likely not an issue with an empty beans.xml. However, with the change to the default value of bean-discovery-mode to annotated this may require changes to deployments. If we add @ApplicationPath, @Provider and @Path as bean defining annotation this will allow these to be treated as CDI beans. The one catch is if a type extends jakarta.ws.rs.core.Application and does not have a @ApplicationPath annotation, then it will likely not be discovered.