1 25 package org.objectweb.easybeans.tests.common.interceptors.lifecycle.postconstruct; 26 27 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType.POST_CONSTRUCT; 28 29 import javax.annotation.PostConstruct; 30 import javax.interceptor.InvocationContext; 31 32 import org.objectweb.easybeans.log.JLog; 33 import org.objectweb.easybeans.log.JLogFactory; 34 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; 35 36 41 public class PostConstructLogger01 extends PostConstructWithException00 { 42 43 46 private static JLog logger = JLogFactory.getLog(PostConstructLogger01.class); 47 48 52 @Override 53 @PostConstruct 54 public void interceptor01(final InvocationContext ic) { 55 try { 56 super.log(ic, POST_CONSTRUCT, PostConstructLogger01.class); 57 logger.debug("{0} was invoked.", CallbackType.POST_CONSTRUCT.toString()); 58 ic.proceed(); 59 } catch (Exception e) { 60 throw new IllegalStateException ("Exception in interceptor."); 61 } 62 } 63 64 } 65 | Popular Tags |