What is the Difference between Message Driven Beans and Stateless Session beans
I have recently come across the term Message beans and stateless beans but does not understand the difference between the both, Please let me know the difference between the both. It will help me to implement in my program..Thanks for your suggestion.
Re: What is the Difference between Message Driven Beans and Stateless Session beans
Message-driven beans process multiple JMS messages asynchronously, rather than processing a serialized sequence of method calls. The most visible difference between message-driven beans and session and entity beans is that clients do not access message-driven beans through interfaces. Interfaces are described in the section Defining Client Access with Interfaces. A message-driven bean is an enterprise bean that allows J2EE applications to process messages asynchronously.
Re: What is the Difference between Message Driven Beans and Stateless Session beans
When a message arrives, the container calls the message-driven bean's onMessage method to process the message. Before MDBs were introduced, JMS described a classical approach to implement asynchronous method invocation. the EJB 2.0 Container sets itself up as a listener for asynchronous invocation and directly invokes the bean (no interfaces), which then behaves like an enterprise bean. It acts as a JMS message listener, which is similar to an event listener except that it receives messages instead of events.
Re: What is the Difference between Message Driven Beans and Stateless Session beans
To start the wizard, select FileNewEnterprise Bean. In the General dialog box of the wizard, select the Message-Driven radio button. The client sending the message to the destination need not be aware of the MDBs deployed in the EJB Container. However, the message must conform to JMS specifications. The messages may be sent by any J2EE component--an application client, another enterprise bean, or a Web component--or by a JMS application or system that does not use J2EE technology.