package com.cfl.aop.interceptor;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
public class InterceptorCommonService {
@AroundInvoke
public Object interceptorMethod(InvocationContext ic) throws Exception {
System.out.println("InterceptorCommonService -----------excuting!excuting!excuting!excuting!-------------:" + ic.getMethod().getName());
return ic.proceed();
}
}
@Stateless
@Interceptors({InterceptorCommonService.class, InterceptorCommonService2.class})
//@Interceptors(InterceptorCommonService.class)
@Remote
public class LoginBeanimpl {
***;
@AroundInvoke
public String loggerImpl{
***;
}
@ExcludeClassInterceptors
public String veritfy(User user) {
***;
}
public void login(){
***;
}
}
原文:http://blog.csdn.net/cfl20121314/article/details/45111265