javax.ejb

Interface MessageDrivenBean

All Superinterfaces:
EnterpriseBean, Serializable
Known Implementing Classes:
AbstractJmsMessageDrivenBean, AbstractMessageDrivenBean

public interface MessageDrivenBean
extends EnterpriseBean

The main ejb context.

Method Summary

void
ejbRemove()
void
setMessageDrivenContext(MessageDrivenContext ctx)

Method Details

ejbRemove

public void ejbRemove()
            throws EJBException
Usages and Demos :

View More Examples of ejbRemove()
   1: import javax.jms.Message;
   2: import javax.ejb.MessageDrivenBean;
   3: import javax.ejb.EJBException;
   4:         ...
   5: public class MessageListenerAdapter
   6:   implements MessageListener, MessageDrivenBean
   7: {
   8:         ...
   9:   private final Object _listener;
  10:   private final MessageDrivenBean _messageDrivenBean;
  11:   private final Method _onMessageMethod;
  12:         ...
  13:     if (_messageDrivenBean != null)
  14:       _messageDrivenBean.ejbRemove();

View Full Code Here

setMessageDrivenContext

public void setMessageDrivenContext(MessageDrivenContext ctx)
            throws EJBException
Usages and Demos :

View More Examples of setMessageDrivenContext(MessageDrivenContext ctx)
   1: 
   2: import javax.ejb.MessageDrivenBean;
   3: import javax.ejb.MessageDrivenContext;
   4:         ...
   5: 
   6:         MessageDrivenBean bean = null;
   7:         try {
   8:         ...
   9:             bean = (MessageDrivenBean) beanClass.newInstance();
  10:         } catch (Exception e) {
  11:         ...
  12:         try {
  13:             bean.setMessageDrivenContext((MessageDrivenContext) ctx.getEJBContext());

View Full Code Here
   1: import javax.jms.Message;
   2: import javax.ejb.MessageDrivenBean;
   3: import javax.ejb.EJBException;
   4:         ...
   5: public class MessageListenerAdapter
   6:   implements MessageListener, MessageDrivenBean
   7: {
   8:         ...
   9:   private final Object _listener;
  10:   private final MessageDrivenBean _messageDrivenBean;
  11:   private final Method _onMessageMethod;
  12:         ...
  13:     if (_messageDrivenBean != null)
  14:       _messageDrivenBean.setMessageDrivenContext(ctx);

View Full Code Here