-
1. Re: Interception in not injected method bean
jharting Apr 26, 2012 3:45 AM (in response to lucasvc)1 of 1 people found this helpfulYes, only the methods that are invoked on a contextual reference (injected reference) are intercepted. This is given by the specification. What's the scope of your component? If it is normal-scoped, you can always inject a self-reference and invoke the method on it. This invocation will be intercepted.
-
2. Re: Interception in not injected method bean
lucasvc Apr 26, 2012 3:50 AM (in response to jharting)Jozef Hartinger escribió:
This is given by the specification.
Where? Just because then I skipped that part....
I've used this "self-reference" injection, but for other meanings. I'll give this option a try
Thanks!
-
4. Re: Interception in not injected method bean
lucasvc Apr 26, 2012 8:16 AM (in response to jharting)Thanks for the reference ^^
But trying the "self-reference", I wanted to make
retrieveFromDatabase()
aprivate
method... But interceptor is not called.But changing from
private
topublic
works. Is that correct too, right? Also is in the CDI spec?Thanks