I'm warming this thread up because over at
https://github.com/payara/Payara/issues/532#issuecomment-315334212 Arjan Tijms, Payara employee since of April* (congrats, Arjan!) the founder of OmniFaces (which we use in Dataverse) and
https://zeef.com , asked us this:
"> using @context for injection in a non JAX-RS component such as a JSF managed bean
Not really sure how that could have worked, as the annotation has to be processed by the DI system, which in the case of the DataverseRequestServiceBean is a named request scoped bean, so CDI would process it and take care of the injection, but it obviously doesn't known about the @Context annotation.
A CDI extension may have been able to do some magic, so if there's indeed a CDI extension used for that, that may be a place to look at.
Additionally, CDI provides a build-in bean for HttpServletRequest, so you can @Inject the HttpServletRequest as well. Was there ever a specific reason to try to use @Context here for that?"
This question from Arjan is over my head, but if someone can please comment on that GitHub issue, it would be appreciated!