1 25 package org.objectweb.easybeans.tests.common.interceptors.lifecycle.misc; 26 27 import javax.annotation.PostConstruct; 28 import javax.annotation.PreDestroy; 29 import javax.ejb.PostActivate ; 30 import javax.ejb.PrePassivate ; 31 import javax.interceptor.InvocationContext; 32 33 import org.objectweb.easybeans.log.JLog; 34 import org.objectweb.easybeans.log.JLogFactory; 35 36 41 public class AllLifeCallback00 { 42 43 46 private JLog logger = JLogFactory.getLog(AllLifeCallback00.class); 47 48 52 @PostConstruct 53 public void postConstruct(final InvocationContext ic){ 54 logger.debug("PostConstruct method."); 55 try { 56 ic.proceed(); 57 } catch (Exception e) { 58 return; 59 } 60 } 61 62 66 @PreDestroy 67 public void preDestroy(final InvocationContext ic){ 68 logger.debug("PreDestroy method."); 69 try { 70 ic.proceed(); 71 } catch (Exception e) { 72 e.printStackTrace(); 73 } 74 } 75 76 80 @PostActivate 81 public void postActivate(final InvocationContext ic){ 82 logger.debug("PostActivate method."); 83 try { 84 ic.proceed(); 85 } catch (Exception e) { 86 e.printStackTrace(); 87 } 88 } 89 90 94 @PrePassivate 95 public void prePassivate(final InvocationContext ic){ 96 logger.debug("PrePassivate method."); 97 try { 98 ic.proceed(); 99 } catch (Exception e) { 100 e.printStackTrace(); 101 } 102 } 103 104 } 105 | Popular Tags |