[weld-dev] Two interceptor bindings considered the same when the only annotation member is nonbinding?
Marko Lukša
marko.luksa at gmail.com
Mon Mar 5 05:50:30 EST 2012
According to the spec, BeanManager.resolveInterceptors() should throw
IAE if two instances of the same interceptor binding type are given.
o.j.weld.tests.interceptors.tb.GenericDAO is annotated @Tx(0) and its
method find() is annotated @Tx(1). The annotation's only member is
*Nonbinding*.
- So @Tx(0) and @Tx(1) are considered to be the _same_ binding?
- The spec allows (doesn't disallow) methods to be annotated with the
same binding type as the class, right?
- However, calling resolveInterceptors with these two should throw IAE?
Currently it does not.
I've made fixes for WELD-999 and now resolveInterceptors does in fact
throw IAE in this case. But I guess I now have to remove duplicate
bindings before calling resolveInterceptors in cases where the method of
a bean is annotated with the same binding type as the bean itself.
Am I wrong in assuming that @Tx(0) and @Tx(1) are the same binding?
Regards
Marko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20120305/ed691338/attachment.html
More information about the weld-dev
mailing list