1 25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.interceptorxml; 26 27 import java.util.List ; 28 29 import javax.ejb.EJB ; 30 import javax.interceptor.InvocationContext; 31 32 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; 33 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.ItfCallbackLoggerAccess; 34 import org.objectweb.easybeans.tests.common.helper.InterceptorHelper; 35 36 42 public class SFSBInterceptorXML implements ItfInterceptorXML { 43 44 47 public static final Integer ORDER = new Integer (0); 48 49 52 @EJB (beanName = "SLSBCallbackLoggerAccess") 53 private ItfCallbackLoggerAccess clBean; 54 55 58 private boolean bolPostConstruct = false; 59 60 63 public SFSBInterceptorXML() { 64 bolPostConstruct = false; 65 } 66 67 72 public List <Integer > insertOrder1(final List <Integer > par) { 73 par.add(ORDER); 74 return par; 75 } 76 77 82 public List <Integer > insertOrder2(final List <Integer > par) { 83 par.add(ORDER); 84 return par; 85 } 86 87 93 public List <Integer > insertOrder2(final List <Integer > par, final int dummy) { 94 par.add(ORDER); 95 return par; 96 } 97 98 103 public List <Integer > insertOrder3(final List <Integer > par) { 104 par.add(ORDER); 105 return par; 106 } 107 108 111 public void postConstruct() { 112 bolPostConstruct = true; 113 } 114 115 118 public void preDestroy() { 119 clBean.insertCallbackLogger(this.getClass().getName(), CallbackType.PRE_DESTROY, this.getClass().getName()); 120 } 121 122 126 public void prePassivate() { 127 } 129 130 134 public void postActivate() { 135 } 137 138 141 public void remove(){ 142 143 } 144 145 149 public boolean calledPostConstruct() { 150 return bolPostConstruct; 151 } 152 153 159 public Object aroundInvoke(final InvocationContext invocationContext) throws Exception { 160 return InterceptorHelper.addValue(invocationContext, ORDER, this.getClass().getName()); 161 162 } 163 } 164 | Popular Tags |