https://issues.apache.org/jira/secure/attachment/12353787/Interceptor-v2.patch

I have attached a patch here that defines a stateless bean and a
stateful bean with lifecycle interceptors at many levels. Both the
beans have super class with in-bean lifecycle interceptors. Then the
beans themselves have in-bean lifecycle interceptors.

The beans declare a @Interceptor class that has lifecycle
interceptors. The interceptor has a super class with lifecycle
interceptor.

There are printlns in the interceptor code to verify the callbacks order.

StatefulInterceptorTests and StatelessInterceptorTests in the client
code invoke the beans though they don't have specific test methods to
test the callbacks. See the printlns above.

Expected results: (interceptor callback in the following order, as per
Section 12.4.1 of core spec)
-------------------------
SuperClassInterceptor
ClassInterceptor
SuperBeanInterceptor
InBeanInterceptor


Actual Result:
--------------------
SuperClassInterceptor


The top most interceptor in the chain executes.  Then it doesn't go
down the chain. You can verify that by removing each top one and it
executes only the next one in the chain.


Cheers
Prasad

Reply via email to