package com.cfl.aop.interceptor;import javax.interceptor.AroundInvoke;import javax.interceptor.InvocationContext;public class InterceptorCommonService {@AroundInvokepublic 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)@Remotepublic class LoginBeanimpl {***;@AroundInvokepublic String loggerImpl{***;}@ExcludeClassInterceptorspublic String veritfy(User user) {***;}public void login(){***;}}
原文:http://blog.csdn.net/cfl20121314/article/details/45111265