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 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.BaseInsertCallbackEvent; 36 37 42 public class PostConstructLogger00 extends BaseInsertCallbackEvent { 43 44 47 private static JLog logger = JLogFactory.getLog(PostConstructLogger00.class); 48 49 53 @PostConstruct 54 public void intercept(final InvocationContext ic) { 55 try { 56 super.log(ic, POST_CONSTRUCT, PostConstructLogger00.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 | Popular Tags |