users@hk2.java.net

Re: Method Interception with HK2 and Guice

From: John Wells <john.wells_at_oracle.com>
Date: Mon, 10 Mar 2014 13:15:09 -0400

You might want to look here, there was a discussion about how to get the
AOP service working in Jersey:

http://stackoverflow.com/questions/22275562/hk2-methodinterceptor-with-jersey-resource

On 3/10/2014 10:17 AM, cdr53x_at_free.fr wrote:
> Hi,
>
> I'm quite new to Jersey and HK2, and I'm trying to make the Guice/HK2
> Bridge work in order to port my existing inejction and AOP code.
> Using the bridge as documented on
> https://hk2.java.net/guice-bridge.html (bi - directional bridge) I can
> have Guice injection working in my rest resource code, and that's
> really nice !
> However the method interception does not get activated on the REST
> resource level ( it works fine for all the low level, pure guice
> injected code )
> Is there
> a) something special to if I'd like the Guice interceptors to work on
> the rest resource level methods ?
> b) a working sample of the HK2 standard interception service ( tried to
> add the interceptor service in my
> https://hk2.java.net/2.3.0-b01/aop-example.html but without success ,
> my rest resource methods keeps ingnoring my custom annotations.
> Thanks for any clues & pointers