<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1478810954494_720682">Greetings,</div><div id="yui_3_16_0_ym19_1_1478810954494_720690"><br></div><div id="yui_3_16_0_ym19_1_1478810954494_720754">I am using:</div><div id="yui_3_16_0_ym19_1_1478810954494_720935"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720932">&lt;dependency&gt;<br id="yui_3_16_0_ym19_1_1478810954494_720699">&nbsp;&nbsp;&nbsp; &lt;groupId&gt;org.jboss.weld.se&lt;/groupId&gt;<br id="yui_3_16_0_ym19_1_1478810954494_720700">&nbsp;&nbsp;&nbsp; &lt;artifactId&gt;weld-se-core&lt;/artifactId&gt;<br id="yui_3_16_0_ym19_1_1478810954494_720701">&nbsp;&nbsp;&nbsp; &lt;version&gt;3.0.0.Alpha15&lt;/version&gt;<br id="yui_3_16_0_ym19_1_1478810954494_720702">&lt;/dependency&gt;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720925"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720980">and I think I found a bug with the interceptors.&nbsp; I wanted to ask about it first before I put it in Jira.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720924"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720828">Basically, the interceptor I have defined works great if I annotate a method called by the CDI container, which in my case is an method observing for an event.&nbsp; I have an ExceptionRetryInterceptor class and an ExceptionRetry annotation.&nbsp; If I annotate an observer method like this:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720829"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720830">@ExceptionRetry</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720834">public void send(<br id="yui_3_16_0_ym19_1_1478810954494_720839">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @Observes @Priority(SEND_EMAIL_MESSAGE) EmailEvent evnt<br id="yui_3_16_0_ym19_1_1478810954494_720840">&nbsp;&nbsp;&nbsp; ) throws MessagingException, IOException {....}</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720841"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720856"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720857">No problem, everything works fine.&nbsp; I can see the interceptor code being called in my logs.&nbsp; <br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720886"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720887">Now here's the problem,&nbsp; If I use this annotation on just a regular method which I call myself, it DOES NOT work.&nbsp; So if I refactor the above example so the annotation is NOT on the observer method called by the container, then the doSend() method below does NOT get wrapped by the interceptor:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720889"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720896"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720897">public void send(<br id="yui_3_16_0_ym19_1_1478810954494_720898">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @Observes @Priority(SEND_EMAIL_MESSAGE) EmailEvent evnt<br id="yui_3_16_0_ym19_1_1478810954494_720899">&nbsp;&nbsp;&nbsp; ) throws MessagingException, IOException {</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720909">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //....</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720908">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; doSend();</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720907">}</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720911"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_720910">@ExceptionRetry</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721008">public void doSend() {....}&nbsp; // this method does not get wrapped by the interceptor</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721027"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721046"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721038">I'm trying to figure out why. My ExceptionRetryInterceptor class has a @Priority set on it and that works fine.&nbsp; But I've also tried setting &lt;interceptors&gt; in beans.xml but the doSend(){...} method still doesn't get wrapped.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721073"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721074">Any thoughts/help?<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1478810954494_721025"><br></div><div id="yui_3_16_0_ym19_1_1478810954494_720662"><br></div><div id="yui_3_16_0_ym19_1_1478810954494_720658"><br></div><div id="yui_3_16_0_ym19_1_1478810954494_720641"><br></div></div></body></html>