1 25 package org.objectweb.easybeans.tests.common.ejbs.mdb.beanmanaged.timer; 26 27 import static org.objectweb.easybeans.tests.common.resources.UserTransactionTester.checkInstance; 28 29 import javax.ejb.ActivationConfigProperty ; 30 import javax.ejb.MessageDriven ; 31 import javax.ejb.TransactionManagement ; 32 import javax.ejb.TransactionManagementType ; 33 import javax.jms.MessageListener ; 34 import javax.transaction.UserTransaction ; 35 36 import org.objectweb.easybeans.tests.common.ejbs.base.timer.BaseTimeoutCallbackAccess; 37 import org.objectweb.easybeans.tests.common.jms.JMSManager; 38 39 40 46 @MessageDriven (messageListenerInterface = MessageListener .class, activationConfig = { 47 @ActivationConfigProperty (propertyName = "destinationType", propertyValue = "javax.jms.Queue"), 48 @ActivationConfigProperty (propertyName = "destination", propertyValue = JMSManager.DEFAULT_QUEUE), 49 @ActivationConfigProperty (propertyName = "messageSelector", propertyValue = "TYPE = 'org.objectweb.easybeans.tests." 50 + "common.ejbs.mdb.beanmanaged.timer.MDBBeanManagedTimeoutCallbackAccess00'")}) 51 @TransactionManagement (TransactionManagementType.BEAN) 52 public class MDBBeanManagedTimeoutCallbackAccess00 extends BaseTimeoutCallbackAccess{ 53 54 57 public static final String MESSAGE_TYPE = "org.objectweb.easybeans.tests.common.ejbs.mdb.beanmanaged." 58 + "timer.MDBBeanManagedTimeoutCallbackAccess00"; 59 60 64 @Override 65 public String getName() { 66 return MDBBeanManagedTimeoutCallbackAccess00.class.getName(); 67 } 68 69 74 @Override 75 public boolean testUserTransaction(final UserTransaction utx) { 76 try{ 77 checkInstance(utx); 78 return true; 79 }catch(Exception e){ 80 return false; 81 } 82 } 83 84 } 85 | Popular Tags |