1 22 package org.jboss.ejb3.test.bank; 23 24 import javax.interceptor.InvocationContext; 25 26 30 public class ExternalCallbackListener 31 { 32 public void postConstruct(InvocationContext ctx) 33 { 34 TestStatusBean.postConstruct = true; 35 try 36 { 37 ctx.proceed(); 38 } 39 catch (Exception e) 40 { 41 throw new RuntimeException (e); 42 } 43 } 44 45 public void preDestroy(InvocationContext ctx) 46 { 47 TestStatusBean.preDestroy = true; 48 try 49 { 50 ctx.proceed(); 51 } 52 catch (Exception e) 53 { 54 throw new RuntimeException (e); 55 } 56 } 57 58 public void postActivate(InvocationContext ctx) 59 { 60 TestStatusBean.postActivate = true; 61 try 62 { 63 ctx.proceed(); 64 } 65 catch (Exception e) 66 { 67 throw new RuntimeException (e); 68 } 69 } 70 71 public void prePassivate(InvocationContext ctx) 72 { 73 TestStatusBean.prePassivate = true; 74 try 75 { 76 ctx.proceed(); 77 } 78 catch (Exception e) 79 { 80 throw new RuntimeException (e); 81 } 82 } 83 } 84 | Popular Tags |