1 25 package org.objectweb.easybeans.tests.common.ejbs.mdb.containermanaged.lifecallback; 26 27 import javax.annotation.PostConstruct; 28 import javax.interceptor.InvocationContext; 29 30 import org.objectweb.easybeans.log.JLog; 31 import org.objectweb.easybeans.log.JLogFactory; 32 33 34 40 public class PostConstructMDB { 41 42 45 private static JLog logger = JLogFactory.getLog(PostConstructMDB.class); 46 47 51 @PostConstruct 52 public void intercept(final InvocationContext ic) { 53 try { 54 logger.debug("External interceptor was invoked."); 55 if (ic.getTarget() instanceof MDBLifecycle00){ 56 ((MDBLifecycle00) ic.getTarget()).setStatusPostConstruct(true); 57 } 58 ic.proceed(); 59 } catch (Exception e) { 60 throw new IllegalStateException ("Exception in interceptor."); 61 } 62 } 63 64 } 65 | Popular Tags |