users@jersey.java.net

[Jersey] Injecting into Filters

From: Ari King <ari.brandeis.king_at_gmail.com>
Date: Tue, 14 Jul 2015 13:31:29 -0400

Hi,

I've created a server filter that extends jersey's
"ContainerRequestFilter", within this custom filter I'd like to inject an
object. To accomplish this I created a factory that implements jersey's
"hk2.api.Factory" and configuration. This setup successfully injects the
(EntityManager) object into resources, however, it fails to inject the
object into the filter.

Does anyone know how to configure jersey to inject objects into filters?

Thanks.

-Ari