<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>There are two differents scenario for lifecycle callbacks in interceptors specification<br><br>1* Used in interceptor class with InvocationContext parameter<br>&nbsp;&nbsp;&nbsp;&nbsp; @PreDestroy<br>&nbsp;&nbsp;&nbsp;&nbsp; public void blabla(InvocationContext){}<br>2* Used in bean class without any parameter<br>&nbsp;&nbsp;&nbsp;&nbsp; @PreDestroy<br>&nbsp;&nbsp;&nbsp;&nbsp; public void blabla(){}<br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>In TCK, @PreDestroy is used in interceptor class. So it may take InvocationContext.<br><br>--Gurkan<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Gavin King &lt;gavin.king@gmail.com&gt;<br><b><span
 style="font-weight: bold;">To:</span></b> Gurkan Erdogdu &lt;gurkanerdogdu@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> weld-dev@lists.jboss.org<br><b><span style="font-weight: bold;">Sent:</span></b> Mon, November 30, 2009 9:10:17 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [weld-dev] TCK Interceptors Classes<br></font><br>
Hrm, I think there are two kinds of @PreDestroy methods for an interceptor:<br><br>@PreDestroy void foo(InvocationContext) { .. }&nbsp; -&gt; the intercepted<br>bean is being destroyed<br>@PreDestroy void foo() { .. }&nbsp; -&gt; the interceptor itself is being destroyed<br><br>Right?<br><br>On Mon, Nov 30, 2009 at 1:34 PM, Gurkan Erdogdu &lt;<a ymailto="mailto:gurkanerdogdu@yahoo.com" href="mailto:gurkanerdogdu@yahoo.com">gurkanerdogdu@yahoo.com</a>&gt; wrote:<br>&gt; Hi;<br>&gt;<br>&gt; Some interceptors classes in the TCK test suites implement @PreDestroy<br>&gt; methods. AFAIK, interceptors specification says that methods with<br>&gt; @PreDestroy in interceptor class must take InvocationContext parameter. But<br>&gt; in TCK, those methods do not take InvocationContext parameter<br>&gt;<br>&gt; For example:<br>&gt;<br>&gt; org.jboss.jsr299.tck.tests.context.dependent.TransactionalInterceptor<br>&gt;<br>&gt; @PreDestroy public void destroy()<br>&gt;
 &nbsp;&nbsp; {<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; destroyed = true;<br>&gt; &nbsp;&nbsp; }<br>&gt;<br>&gt; Is it correct?<br>&gt;<br>&gt; --Gurkan<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; weld-dev mailing list<br>&gt; <a ymailto="mailto:weld-dev@lists.jboss.org" href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>&gt;<br><br><br><br>-- <br>Gavin King<br><a ymailto="mailto:gavin.king@gmail.com" href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br><span><a target="_blank" href="http://in.relation.to/Bloggers/Gavin">http://in.relation.to/Bloggers/Gavin</a></span><br><span><a target="_blank" href="http://hibernate.org">http://hibernate.org</a></span><br><span><a target="_blank"
 href="http://seamframework.org">http://seamframework.org</a></span><br></div></div>
<!-- cg11.c1.mail.mud.yahoo.com compressed/chunked Wed Nov 25 10:02:22 PST 2009 -->
</div><br>



      </body></html>