Valid 1Z0-895 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-895 Exam! ExamDiscuss.com now offer the newest 1Z0-895 exam dumps, the ExamDiscuss.com 1Z0-895 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-895 dumps with Test Engine here:
A developer writes three interceptor classes: AInt, BInt, and CInt. Each interceptor class defines an AroundInvoke method called interceptor. In the ejb-jar.xml descriptor, CInt is declared as the default interceptor. FooBean is a stateless session bean with a local business interface Foo that declares a method Foo (): 10. @Stateless 11. @Interceptors(AInt.class) 12. public class FooBean Implements Foo { 13. 14. @Interceptors (BInt.class) 15. @ExcludeClassInterceptors 16. public void foo () {} 17. } What is the interceptor order when the business method foo () is invoked?
Correct Answer: B
Explanation/Reference: The default Intercepter, CInt, comes first. The class intercepter AInt is excluded by @ExcludeClassInterceptors, so the Method Intercepter BInt would be next in order. Note 1: By default the ordering of interceptors when invoking a method are * External interceptors ** Default interceptors, if present ** Class interceptors, if present ** Method interceptors, if present * Bean class interceptor method Note 2: Annotation Type ExcludeClassInterceptors Used to exclude class-level interceptors for a business method or timeout method of a target class. Reference: EJB Interceptors http://docs.jboss.org/ejb3/app-server/tutorial/interceptor/interceptor.html