Is there a way to achieve the same result described here not depending on jersey but pure jax-rs? I'd like to create a Custom Injection Provider like Jersey so I can inject MyClass extracting custom data from HttpServletRequest
@Inject
protected MyClass myClass;
I also found this discussion useful, it works the same with java.util.function.Supplier
but Jersey is still needed in this code:
bindFactory(MyFactoryOrSupplier.class)
.to(MyClass.class)
.in(RequestScoped.class);
EDIT:
CDI is also a good alternative, but pure jax-rs is preferable