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:
An ejb-jar also contains three interceptor classes: AInt, BInt, CInt. Each interceptor class defines an AroundInvoke method called intercept. The ejb-jar also contains a stateless session bean FooBean with a local business interface Foo that declares a method foo (): 10. @Stateless 11. @Intercaptors ({CInt.class, BInt.class}) 12. public class FooBean implements Foo { 13. 14. public void foo () {} 15. 16. } The ejb-jar contains a META-INF/ejb-jar.xml file with an <interceptor-binding> section: <interceptor-binding> <ejb-name>FooBean</ejb-name> <interceptor-order> <interceptor.class>com.acme.AInt</interceptor-class> </interceptor-order> </interceptor.binding> What is the interceptor order when the business methodfoo() is invoked?
Correct Answer: B
Explanation/Reference: With the interceptor-order clauses Aint will be first in the order of interceptors. Within each group (default, class, method) the order of the interceptors are from left to right as defined in the @Interceptors annotation, and then the xml interceptors. In this scenario, with the @Intercaptors ({CInt.class, BInt.class}) line, the ordering continues with CInt and BInt. 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: You can override the default sort order of the external interceptors by specifiying an interceptor- binding with an interceptor-order specifying the order of the interceptors Reference: EJB Interceptors http://docs.jboss.org/ejb3/app-server/tutorial/interceptor/interceptor.html