1 25 package org.objectweb.easybeans.tests.common.ejbs.mdb.containermanaged.mdbinterface; 26 27 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType.UNDEFINED; 28 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.OperationType.MESSAGE_DRIVEN_CONTEXT; 29 30 import javax.ejb.ActivationConfigProperty ; 31 import javax.ejb.EJBException ; 32 import javax.ejb.MessageDriven ; 33 import javax.ejb.MessageDrivenBean ; 34 import javax.ejb.MessageDrivenContext ; 35 import javax.jms.Message ; 36 import javax.jms.MessageListener ; 37 38 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.BaseInsertOperation; 39 import org.objectweb.easybeans.tests.common.jms.JMSManager; 40 41 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 = 50 "TYPE = 'org.objectweb.easybeans.tests.common.ejbs.mdb.containermanaged.mdbinterface.MDBInterface00'")}) 51 public class MDBInterface00 extends BaseInsertOperation implements MessageDrivenBean { 52 53 56 public static final String MESSAGE_TYPE = "org.objectweb.easybeans.tests.common.ejbs.mdb." 57 + "containermanaged.mdbinterface.MDBInterface00"; 58 59 62 private static final long serialVersionUID = 4108218174206348937L; 63 64 67 private MessageDrivenContext ctx; 68 69 73 public void ejbRemove() throws EJBException { 74 } 76 77 81 public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException { 82 this.ctx = ctx; 83 } 84 85 89 public void onMessage(final Message message) { 90 if (ctx != null) { 91 super.log(MDBInterface00.class, UNDEFINED, MDBInterface00.class, MESSAGE_DRIVEN_CONTEXT); 92 } 93 } 94 95 } 96 | Popular Tags |