I know but why wont Guice instrument it, I know it's sort of unmanaged
since I provided the instance. But I would have assumed that the second I
bound it using guice, it would invoke the interceptors.

How can I manually instrument it using the interceptors available to guice?

regards nino

2012/1/6 Stuart McCulloch <[email protected]>

> On 6 Jan 2012, at 10:47, nino martinez wael wrote:
>
> > Hi
> >
> > I've just stumbled across something I think are strange.
> >
> > I have a GUICE/AOP cache module, when I bind a class using a module, my
> interceptor pickups calls to the methods annotated as wanted.
> >
> > However if I bind to a instance of the same class it my interceptor
> never gets activated. Why are there a difference, between the two?
>
> In the first case, Guice is in control of creating the instance so it can
> construct it using an instrumented version of the class (using cglib).
>
> In the second case, you're asking Guice to use an existing instance
> (as-is) which won't be instrumented unless you have done this yourself.
>
> > regards Nino
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "google-guice" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected].
> > For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to