-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@InterceptorBinding no longer recognized/fired when they have additional fields #5373
Comments
Hi @Xnyle! Depending on how you want the interceptor to be activated, you might need to add the @NonBinding annotation to the If this doesn't help you solve your issue, could you please add more details about your interceptor and intercepted methods, or even better provide a minimal reproducer? |
Ok, learned something new, while @NonBinding might solve my problem, shouldn't any interceptor annotation used without any parameters still match all the default values defined in the binding definition? Which it does on Wildfly/Thorntail but not on Quarkus. Although I haven't tested it, I think you can reuse https://github.com/quarkusio/quarkus/blob/master/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/interceptors/bindings/MyTransactional.java, remove @NonBinding and then use @MyTransactional() without any parameters in InvocationContextBindingsTest. That should reproduce my usecase and the expectation is that the interceptor still fires. |
If it works with Wildfly and Thorntail but not with Quarkus, then it's worth asking @mkouba for his opinion. |
Yes, I think that default values should be used for both the bean and the interceptor. In other words, the interceptor should be bound to a bean annotated with the binding that has the same annotation member value. It's probably a bug. I'll look into the relevant parts of ArC. |
This interceptor binding is working fine, if there is an interceptor (having @priority annotation or not, @AroundInvoke gets fired wherever @StorageThreadSession is annotated):
adding a field to the binding definition, @AroundInvoke stops working, it seems the interceptor binding is not recognized at all in this case:
I can split up my annotation but I don't think that this is the desired behaviour.
The text was updated successfully, but these errors were encountered: