<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> @PreDestroy<br> public void blabla(InvocationContext){}<br>2* Used in bean class without any parameter<br> @PreDestroy<br> 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 <gavin.king@gmail.com><br><b><span
style="font-weight: bold;">To:</span></b> Gurkan Erdogdu <gurkanerdogdu@yahoo.com><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) { .. } -> the intercepted<br>bean is being destroyed<br>@PreDestroy void foo() { .. } -> the interceptor itself is being destroyed<br><br>Right?<br><br>On Mon, Nov 30, 2009 at 1:34 PM, Gurkan Erdogdu <<a ymailto="mailto:gurkanerdogdu@yahoo.com" href="mailto:gurkanerdogdu@yahoo.com">gurkanerdogdu@yahoo.com</a>> wrote:<br>> Hi;<br>><br>> Some interceptors classes in the TCK test suites implement @PreDestroy<br>> methods. AFAIK, interceptors specification says that methods with<br>> @PreDestroy in interceptor class must take InvocationContext parameter. But<br>> in TCK, those methods do not take InvocationContext parameter<br>><br>> For example:<br>><br>> org.jboss.jsr299.tck.tests.context.dependent.TransactionalInterceptor<br>><br>> @PreDestroy public void destroy()<br>>
{<br>> destroyed = true;<br>> }<br>><br>> Is it correct?<br>><br>> --Gurkan<br>><br>><br>><br>><br>> _______________________________________________<br>> weld-dev mailing list<br>> <a ymailto="mailto:weld-dev@lists.jboss.org" href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>><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>