1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger; 26 27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 28 29 import java.util.ArrayList ; 30 import java.util.List ; 31 32 import org.objectweb.easybeans.log.JLog; 33 import org.objectweb.easybeans.log.JLogFactory; 34 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; 35 36 42 public class CallbackChecker { 43 44 47 private ItfCallbackLoggerAccess opLog; 48 49 50 53 public CallbackChecker(){ 54 try { 55 opLog = getBeanRemoteInstance(SLSBCallbackLoggerAccess.class, ItfCallbackLoggerAccess.class); 56 } catch (Exception e) { 57 e.printStackTrace(); 58 throw new IllegalStateException ("Bean instance not found."); 59 } 60 } 61 62 67 public void check(final String className, final CallbackType event) { 68 69 List <String > arEvent = new ArrayList <String >(); 71 72 arEvent.add(className); 73 74 this.check(className, event, arEvent); 75 } 76 77 84 public void check(final String className, final CallbackType event, final List <String > eventClassNames) { 85 opLog.verifyCallbackOrder(className, event, eventClassNames.toArray(new String [0])); 86 } 87 88 92 public void deleteAll() throws Exception { 93 opLog.deleteAll(); 94 } 95 } 96 | Popular Tags |