package org.jboss.test.mdb.bean;
import javax.ejb.MessageDrivenBean;
import javax.ejb.MessageDrivenContext;
import javax.ejb.EJBException;
import javax.jms.MessageListener;
import javax.jms.Message;
import org.apache.log4j.Category;
public class QueueBean implements MessageDrivenBean, MessageListener{
private static final Category log = Category.getInstance(QueueBean.class);
private MessageDrivenContext ctx = null;
public QueueBean() {
}
public void setMessageDrivenContext(MessageDrivenContext ctx)
throws EJBException {
this.ctx = ctx;
}
public void ejbCreate() {}
public void ejbRemove() {ctx=null;}
public void onMessage(Message message) {
log.debug("DEBUG: QueueBean got message" + message.toString() );
}
}