<div dir="ltr">Hi,<div><br></div><div style>I just went through this thread and corresponding issue <a href="https://issues.jboss.org/browse/WELD-1416">WELD-1416</a> and still not clear for me</div><div style><br></div><div style>
Josef Hartinger referenced a statement from the current version of spec:</div><div style><span style="color:rgb(0,0,0);font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:13px;line-height:17px">&quot;With the exception of AroundConstruct lifecycle callback interceptors, an interceptor for lifecycle callbacks may only declare interceptor binding types that are defined as Target(TYPE).&quot;</span><br>
</div><div style><br></div><div style><div>but does it mean that adding @AroundConstruct callback interceptor into class PerformanceInterceptor prevents from DefinitionException ?</div><div>or in such case there should be only @AroundConstruct defined and none of both @PostConstruct and @PreDestroy ?</div>
<div><br></div><div>enhanced sample of Jens Schumann:<br></div><div><p style="margin:16px 0px 0px;padding:0px">@Interceptor<br>@Measure<br>public class PerformanceInterceptor implements Serializable {<br><br>@AroundInvoke<br>
public Object measure(InvocationContext ctx) throws Exception { ... }<br><br>@PostConstruct<br>public void measureCreate(InvocationContext ctx) { ... }<br><br><b>@AroundConstruct</b><br>Object onAroundConstruct(InvocationContext ctx) throws Exception {...}<br>
}<br><br>@InterceptorBinding<br>@Target({<b>ElementType.METHOD</b>, ElementType.TYPE})<br>@Retention(RetentionPolicy.RUNTIME)<br>@Inherited<br>public @interface Measure {<br>}<br></p><div><br></div><div>thanx for clarification,</div>
</div><div style>Radim</div></div></div>