1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger; 26 27 import javax.ejb.EJB ; 28 import javax.interceptor.InvocationContext; 29 30 import org.objectweb.easybeans.log.JLog; 31 import org.objectweb.easybeans.log.JLogFactory; 32 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; 33 34 35 40 public class BaseInsertCallbackEvent { 41 42 45 private JLog logger = JLogFactory.getLog(BaseInsertCallbackEvent.class); 46 47 50 @EJB (beanName="SLSBCallbackLoggerAccess") 51 private ItfCallbackLoggerAccess beanLogger; 52 53 59 public void log(final InvocationContext ic, final CallbackType type, final Class interceptorClass){ 60 log(ic.getTarget().getClass().getName(), type, interceptorClass.getName()); 61 } 62 63 69 public void log(final Class interceptedClass, final CallbackType type, final Class interceptorClass){ 70 log(interceptedClass.getName(), type, interceptorClass.getName()); 71 } 72 73 79 public void log(final String interceptedClassName, final CallbackType type, final String interceptorClassName){ 80 logger.debug("Logging event: {0}", interceptorClassName); 81 beanLogger.insertCallbackLogger(interceptedClassName, type, interceptorClassName); 82 } 83 } 84 | Popular Tags |