Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

By: Ash Emailed: 1696 times Printed: 2202 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Question: What is the difference between Message Driven Beans and Stateless Session beans?

Answer:

In several ways, the dynamic creation and allocation of message-driven bean instances mimics the behavior of stateless session EJB instances, which exist only for the duration of a particular method call.

However, message-driven beans are different from stateless session EJBs (and other types of EJBs) in several significant ways: Message-driven beans process multiple JMS messages asynchronously, rather than processing a serialized sequence of method calls.

Message-driven beans have no home or remote interface, and therefore cannot be directly accessed by internal or external clients. Clients interact with message-driven beans only indirectly, by sending a message to a JMS Queue or Topic. Only the container directly interacts with a message-driven bean by creating bean instances and passing JMS messages to those instances as necessary. The Container maintains the entire lifecycle of a message-driven bean; instances cannot be created or removed as a result of client requests or other API calls.

 

 

 

 

Interview Home | All Interview Tutorials | Latest Interview Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Ash
Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?
Interview Question: Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
Interview Question: What is the difference between find and select methods in EJB?
Interview Question: What is the difference between JavaBean and EJB?
Interview Question: What is abstract schema?
Interview Question: What is local interface. How values will be passed?
Interview Question: What is Message Driven Bean?
Interview Question: What are the call back methods in Entity bean?
Interview Question: What is deployment descriptor?
Interview Question: How many EJB Objects are created for a Bean?
Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?
Interview Question: What is lazy loading?
Interview Question: What is the difference between EAR, JAR and WAR file?
Interview Question: Can i map more than one table in a CMP?
Interview Question: Is Decorator an EJB design pattern?

More Tutorials in Interview
What is J2EE?
What do you understand by a J2EE module?
Tell me something about J2EE component?
What are the contents of web module?
Differentiate between .ear, .jar and .war files.
What is the difference between Session Bean and Entity Bean?
Why J2EE is suitable for the development distributed multi-tiered enterprise applications?
What do you understand by a container?
What are the services provided by a container?
What are types of J2EE clients?
What is Deployment Descriptor?
What do you understand by JTA and JTS?
What is JAXP?
What is J2EE Connector architecture?
What is difference between Java Bean and Enterprise Java Bean?

More Latest News
Most Viewed Articles (in Interview )
What is Collection API?
Interview Question: What is Action Class?
Interview Question: What is the difference between EAR, JAR and WAR file?
Interview Question: What is lazy loading?
Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?
Explain the different forms of Polymorphism.
What is the difference between jsp:forward and response.sendRedirect(url),?.
What types of comments are available in the JSP?
Interview Question: How is the MVC design pattern used in Struts framework?
Interview Question: What is ActionServlet?
Interview Question: Can I invoke Runtime.gc() in an EJB?
Interview Question: What is Message Driven Bean?
Interview Question: What is abstract schema?
Question: What is an Expression tag in JSP?
What is J2EE?
Most Emailed Articles (in Interview)
What is J2EE Connector architecture?
Interview Question: How does Struts work?
Question: Difference between forward and sendRedirect in JSP?
Is Iterator a Class or Interface? What is its use?
What is the difference between jsp:include page and @ include file?
What is the difference between interface and abstract class?
Interview Question: What is difference between EJB 1.1 and EJB 2.0?
Getting started with Interview
What is similarities/difference between an Abstract class and Interface?
Explain the different forms of Polymorphism.
Interview Question: How is the MVC design pattern used in Struts framework?
Interview Question: Who makes the Struts?
Interview Question: What is ActionForm?
Interview Question: Do you have to credit Struts on your own website?
Interview Question: Where can I get a copy of Struts?