-
Hello, I have two questions about
Example :
Example:
I know that in traditional Java EE we previously needed to do this :
Is this self injection necessary also in Quarkus or is it not needed ? (Note: Would be great to add these infos in the documentation) Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The part about self invocation is covered in quarkus cdi documentation. The part about discouraging from using private members is covered in chapter about private members of cdi documentation |
Beta Was this translation helpful? Give feedback.
-
Yes, it does. However,
@RemigiuszDudek is right. In Quarkus, intercepted self-invocation works but it's a non-standard feature because CDI does not define this behavior at all. |
Beta Was this translation helpful? Give feedback.
Yes, it does. However,
private
methods are not intercepted. There's also thequarkus.arc.fail-on-intercepted-private-method
config property - if enabled (the default), the build fails if aprivate
method that is neither an observer nor a producer, is annotated with an interceptor binding.@RemigiuszDudek is right. In Quarkus, intercepted self-invocation works but it's a non-standard feature because CDI does not define this behavior at all.