<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I don't see a particular issue with the test. The rules on what business method invocations are and aren't should make it clear that invocations on the instance acquired via getTarget() are intercepted, or, for that matter, decorated. &nbsp;Those are *not* business method invocations (in the same way as calls to 'this' are not business method invocations).&nbsp;<div><br></div><div>Weld implements interception/decoration via subclassing and observes this exact rule (invocations on this and instances acquired by getTarget() are not intercepted/decorated).<br><div><br></div><div>Also, this has been previously discussed here (a couple of links from an older weld-dev thread)</div><div><a href="http://lists.jboss.org/pipermail/weld-dev/2010-May/002517.html">http://lists.jboss.org/pipermail/weld-dev/2010-May/002517.html</a></div><div><a href="http://lists.jboss.org/pipermail/weld-dev/2010-May/002519.html">http://lists.jboss.org/pipermail/weld-dev/2010-May/002519.html</a></div><div><a href="http://lists.jboss.org/pipermail/weld-dev/2010-May/002519.html"></a><br><div><div><div><div>On 2011-01-06, at 12:34 PM, Scott Ferguson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Jozef Hartinger wrote:<br><blockquote type="cite">Could you file a CDITCK issue and assign it to me? Thanks.<br></blockquote><blockquote type="cite"><br></blockquote><br>Thanks Jozef,<br><br>It's at <a href="https://issues.jboss.org/browse/CDITCK-203">https://issues.jboss.org/browse/CDITCK-203</a>.<br><br>I'm pretty sure I don't have permission to assign you tasks, though. :)<br><br>-- Scott<br><br><blockquote type="cite">On 01/06/2011 03:24 AM, Scott Ferguson wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">This test has a implementation-dependency on how interception is<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">implemented (requires proxy implementation), but the proxy<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">implementation is not mandated by the spec (and the EJB spec has always<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">allowed both implementation methods.)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The test calls SimpleBean.getId(), which is intercepted by Interceptor1.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Interceptor1's aroundInvoke calls target.getId(), which is a circular<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">reference for extension and only works for proxy-based interception:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">class SimpleBean {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;@Interceptors(Interceptor1.class)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;public int getId()<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return id;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">class Interceptor1 {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;@AroundInvoke<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;public Object aroundInvoke(InvocationContext ctx) throws Exception<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;{<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SimpleBean target = (SimpleBean) ctx.getTarget();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int id1 = target.getId();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The only change needed to the test is to create a SimpleBean.getBareId()<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">which is not an intercepted method.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(Or, if the spec is re-interpreted to require a proxy implementation,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">there should be an explicit test for it, not an implicit dependency like<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">this test.)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">-- Scott<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">weld-dev mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/weld-dev">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br>_______________________________________________<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<br></div></blockquote></div><br></div></div></div></div></body></html>