<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>I need ElementType.METHOD since I want to use the same interceptor binding annotation for both business method and lifecycle callback interception. However I have a dedicated @AroundInvoke and @PostConstruct interceptor method. If I declare my annotation
 at method level I would expect that @AroundInvoke is applied only.</div>
<div><br>
</div>
<div>I just found the related sentence in the interceptor spec. &quot;Method-level interceptors may not be associated with a lifecycle callback method of the target class.&quot;&nbsp;This statement seems to be OK but I believe this doesn't mean that my interceptor binding
 annotation may not specify&nbsp;ElementType.METHOD.</div>
<div><br>
</div>
<div>Jens</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">Von: </span>Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt;<br>
<span style="font-weight:bold">Datum: </span>Mittwoch, 24. April 2013 14:56<br>
<span style="font-weight:bold">An: </span>Jens Schumann &lt;<a href="mailto:jens.schumann@openknowledge.de">jens.schumann@openknowledge.de</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>CDI-Dev &lt;<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>&gt;<br>
<span style="font-weight:bold">Betreff: </span>Re: [cdi-dev] Lifecycle Callback Interceptor and @Target &quot;METHOD&quot;<br>
</div>
<div><br>
</div>
<div>
<div text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Why do you need ElementType.METHOD? You cannot use method-level bindings for lifecycle callback interceptor methods. This has been reverted from the interceptors spec.<br>
<br>
On 04/24/2013 02:17 PM, Jens Schumann wrote:<br>
</div>
<blockquote cite="mid:CD9D99F6.2BBB3%25jens.schumann@openknowledge.de" type="cite">
<div>Hi all!</div>
<div><br>
</div>
<div>While testing Weld&nbsp;2.0.0.CR4 I have been running into a DefinitionException because of an interceptor that contains one @AroundInvoke and one @PostConstruct method. Since I use this interceptor at class AND method level it declares @Target({ElementType.METHOD,
 ElementType.TYPE}). The error message seems to indicate that I can not have a lifecycle callback interceptor with @Target METHOD:&nbsp;</div>
<div><br>
</div>
<div>&quot;WELD-000619 An interceptor for lifecycle callbacks Interceptor XX declares and interceptor binding interface YYY with METHOD as its @Target.&quot;&nbsp;</div>
<div><br>
</div>
<div>Is this true? I just checked the current CDI 1.1 and Interceptor 1.2 spec and could not find this kind of restriction.&nbsp;</div>
<div><br>
</div>
<div>Jens</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre wrap="">_______________________________________________
cdi-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a></pre>
</blockquote>
<br>
</div>
</div>
</span>
</body>
</html>