aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Sequence of Interceptors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Sequence of Interceptors" Watch "Sequence of Interceptors" New topic
Author

Sequence of Interceptors

Anuj Singhal
Greenhorn

Joined: Oct 17, 2003
Posts: 23
There are two interceptors defined for a given method; one at method level and one at class level.
What will be the sequence of execution?

@Stateless
@Interceptors(org.acme.AnotherInterceptor.class)
public class MyBean ... {
...
@Interceptors(org.acme.MyInterceptor.class)
public void someMethod() {
}
}
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1717
    
  25

Hi Anuj,

The sequence is class level first, then method level.

There are more possibilities, please check my notes (chapter 4.1 order of interceptors)

Regards,
Frits
 
 
subject: Sequence of Interceptors