Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
2.2.5.Final
-
None
Description
Given the following bean:
@Binding public class Bean { public void method() {} }
And the following interceptor:
@Binding @Interceptor class Interceptor { @AroundConstruct Object constructor(InvocationContext context) throws Exception { return context.proceed(); } @AroundInvoke Object method(InvocationContext context) throws Exception { return context.proceed(); } }
It happens that the @AroundConstruct callback is called.
From the interceptor specification:
interceptor at the class level applies to all business methods of the class
While the notion of business methods may be subject to interpretation, it is reasonable to consider that constructors are not business methods and as a consequence the @AroundConstruct callback should not be called.