Loading
Message Driven Bean

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What is MDB (Message Driven Bean ) ?


Ans)

A message-driven bean is an enterprise bean that allows J2EE applications to process messages
asynchronously
. It acts as a JMS message listener, which is similar to an event listener except
that it receives messages instead of events.

@MessageDriven(mappedName="jms/Queue")
  public class MessageBean implements MessageListener {
   @Resource
   private MessageDrivenContext mdc;
 
   public void onMessage(Message msg) {
     TextMessage tmsg = null;

   try {
   tmsg = (TextMessage) msg;
 
  } catch (JMSException e) {
  
   }
   public void ejbRemove( )throws EJBException{
   }
}



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Message Driven Bean


Message Driven Bean

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free