How do I @Inject a CDI @ApplicationScoped bean into a @RequestScoped JAX-RS bean?
问题 I've added the @ApplicationScoped CDI annotation to a simple bean: @ApplicationScoped public class History { And tried to then @Inject this into a JAX-RS (resteasy) bean: @RequestScoped @Path("/history") public class HistoryAPI { @Inject private History history; But history remains null. I've got a beans.xml file in WEB-INF. I've tried a lot of variations on this theme, but while the app server (Wildfly) acknowledges it's starting with CDI I can't get the injection to work. Any ideas what I"m