1 22 package org.jboss.test.mdb.bean; 23 24 import javax.ejb.MessageDrivenBean ; 25 import javax.ejb.MessageDrivenContext ; 26 import javax.ejb.EJBException ; 27 28 import javax.jms.MessageListener ; 29 import javax.jms.Message ; 30 31 import org.jboss.logging.Logger; 32 33 42 43 public class QueueBean implements MessageDrivenBean , MessageListener { 44 private static final Logger log = Logger.getLogger(QueueBean.class); 45 46 private MessageDrivenContext ctx = null; 47 public QueueBean() { 48 49 } 50 public void setMessageDrivenContext(MessageDrivenContext ctx) 51 throws EJBException { 52 this.ctx = ctx; 53 } 54 55 public void ejbCreate() {} 56 57 public void ejbRemove() {ctx=null;} 58 59 public void onMessage(Message message) { 60 log.debug("DEBUG: QueueBean got message" + message.toString() ); 61 } 62 } 64 65 | Popular Tags |