users@jersey.java.net

[Jersey] Re: Injection for jersey 2.4.1 with jetty8

From: Louis Crandell <crandell.louis_at_gmail.com>
Date: Tue, 15 Jul 2014 12:56:15 +0200

We have the same issues as we'd like to inject into our filters stuff from
the bean context.
If you can get to the spring application context in the ResourceConfig I
believe you can get an instance of the filter from spring an then register
it.
Can we see a sample with the binder please, I thought that it can be used
strictly for HK2 managed beans?

Regards,
Srdan


On Thu, Jul 10, 2014 at 3:26 PM, Artur Kronenberg <
artur.kronenberg_at_openmarket.com> wrote:

> Hi,
>
> I am currently struggling with jersey injection for spring beans into my
> Filters.
>
> I managed to resolve this for the resources by manually scanning my
> resources to retrieve the beans from spring and use a Binder to bind them
> to its names/types. This works fine for resources.
>
> For Filter this does not work. It refuses to inject anything in there. I
> can't register it with a new context in the configure method because I'd
> need to inject it first to be able to register it. Anyone have any ideas on
> how to solve this issue?
>
> Thank you!
>
> Artur
>