Using CDI with JAX-RS Resources

Since Payara 5.192, CDI injection works by default in JAX-RS classes. Payara will convert all JAX-RS resources into Request Scoped CDI beans, therefore allowing CDI Injection in JAX-RS classes without the need for a bean defining scope.

Prior to Payara 5.192, CDI injection will only be available when the JAX-RS resource is explicitly converted to a CDI bean by use of a bean defining scope or configuration within the beans.xml file.