/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
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;

/**
 * MessageBeanImpl.java
 *
 *
 * Created: Sat Nov 25 18:07:50 2000
 *
 * @author Peter Antman DN <peter.antman@dn.se>
 * @version
 */

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() );
    }
} // MessageBeanImpl