1 25 26 package org.objectweb.easybeans.tests.enhancer.interceptors.lifecycle.bean; 27 28 import javax.annotation.PostConstruct; 29 import javax.annotation.PreDestroy; 30 import javax.ejb.Stateless ; 31 import javax.interceptor.AroundInvoke; 32 import javax.interceptor.InvocationContext; 33 34 39 @Stateless 40 public class StatelessBean3 implements SessionBeanItf { 41 42 45 private int counter = 0; 46 47 50 @PostConstruct 51 public void increment() { 52 counter++; 53 } 54 55 58 @PreDestroy 59 public void decrement() { 60 counter--; 61 } 62 63 64 67 public int getCounter() { 68 return counter; 69 } 70 71 77 @AroundInvoke 78 protected Object dummyInterceptor(final InvocationContext iCtx) throws Exception { 79 return iCtx.proceed(); 80 } 81 82 83 } 84 | Popular Tags |