1 25 package org.objectweb.easybeans.tests.common.interceptors.business.resourceref; 26 27 import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkResource; 28 29 import javax.annotation.Resource; 30 import javax.ejb.SessionContext ; 31 import javax.interceptor.InvocationContext; 32 import javax.mail.Session ; 33 34 40 public class SessionInterceptor { 41 42 45 @Resource 46 private SessionContext sessionContext; 47 48 52 private Session mail00; 53 54 60 public Object aroundInvoke(final InvocationContext invocationContext) throws Exception { 61 checkResource(sessionContext, mail00, "mail/mail00"); 62 return invocationContext.proceed(); 63 } 64 } 65 | Popular Tags |