1 25 package org.objectweb.easybeans.tests.interceptors.business.messagedriven.containermanaged; 26 27 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType.AROUND_INVOKE; 28 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.UNDEFINED; 29 30 import org.objectweb.easybeans.tests.common.ejbs.mdb.containermanaged.interceptororder.MDBInvocationOrder00; 31 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.CallbackChecker; 32 import org.objectweb.easybeans.tests.common.jms.JMSManager; 33 import org.testng.annotations.AfterClass; 34 import org.testng.annotations.AfterMethod; 35 import org.testng.annotations.BeforeClass; 36 import org.testng.annotations.BeforeMethod; 37 import org.testng.annotations.Test; 38 39 40 50 public class TestMDBInvocationOrder { 51 52 55 private JMSManager jmsQueue; 56 57 60 private CallbackChecker checker; 61 62 66 @BeforeClass 67 public void startUp00() throws Exception { 68 jmsQueue = new JMSManager(JMSManager.DEFAULT_QUEUE_CONNECTION_FACTORY, JMSManager.DEFAULT_QUEUE); 69 checker = new CallbackChecker(); 70 } 71 72 76 @BeforeMethod 77 public void startUp01() throws Exception { 78 checker.deleteAll(); 79 } 80 81 87 @Test 88 public void testQueue00() throws Exception { 89 jmsQueue.sendControlMessage(MDBInvocationOrder00.MESSAGE_TYPE, UNDEFINED); 90 checker.check(MDBInvocationOrder00.class.toString(), AROUND_INVOKE); 91 } 92 93 97 @AfterMethod 98 public void tearDown() throws Exception { 99 checker.deleteAll(); 100 } 101 102 106 @AfterClass 107 public void tearDownClass() throws Exception { 108 jmsQueue.close(); 109 } 110 } 111 | Popular Tags |