<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">As Jozef pointed out, this has been clarified in 1.1. So what should
I do in 1.0, since in 1.0 there is nothing that says that
interceptor bindings on methods override the bindings of the class.<br>
<br>
As I wrote below, it is probably perfectly legal to have the same
binding on both the class and the method. But since
BeanManager.resolveInterceptors is supposed to throw an exception if
you pass two instances of the same binding, weld should make sure it
calls resolveInterceptors with only one instance (the method's as in
1.1). <br></div></blockquote><div><br></div><div>Yup.</div><div><br></div><div>Not doing so would probably break a ton of users code.</div><div>Well, mine at least. :-)</div><div><br></div><div>-Ales</div><div><br></div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">On 5.3.2012 17:03, Ales Justin wrote:<br><blockquote cite="mid:8FCB67DA-3358-457D-A394-08D18E85348D@gmail.com" type="cite">
<div>This looks like a normal use-case to me.</div>
<div><br>
</div>
<div>e.g. bean / class has more generic annotation binding,</div>
<div>where you are more fine-grained on the actual method.</div>
<div><br>
</div>
<div>Hence, imo, it should be supported.</div>
<div><br>
</div>
<div>-Ales</div>
<div><br class="Apple-interchange-newline">
<blockquote type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<div bgcolor="#FFFFFF" text="#000000">According to the spec,
BeanManager.resolveInterceptors() should throw IAE if two
instances of the same interceptor binding type are given.<br>
<br>
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 <b>Nonbinding</b>.<br>
<br>
- So @Tx(0) and @Tx(1) are considered to be the _same_
binding? <br>
- The spec allows (doesn't disallow) methods to be annotated
with the same binding type as the class, right?<br>
- However, calling resolveInterceptors with these two should
throw IAE? Currently it does not. <br>
<br>
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.<br>
<br>
Am I wrong in assuming that @Tx(0) and @Tx(1) are the same
binding?<br>
<br>
Regards<br>
Marko<br>
<br>
<br>
</div>
_______________________________________________<br>
weld-dev mailing list<br>
<a moz-do-not-send="true" href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/weld-dev">https://lists.jboss.org/mailman/listinfo/weld-dev</a></blockquote>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
weld-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/weld-dev">https://lists.jboss.org/mailman/listinfo/weld-dev</a></pre>
</blockquote>
<br>
</div>
_______________________________________________<br>weld-dev mailing list<br><a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/weld-dev</blockquote></div><br></body></html>