|
INTERVIEW QUESTIONS
J2EE
EJB
DETAILS
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.
|
|
|
Category |
EJB Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9251 users |
Added on |
9/22/2014 |
Views |
68992 |
Rate it! |
|
|
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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What happens if remove()is never invoked on a session bean?
|
View Answer
|
|
What are the special design care that must be taken when you work with local interfaces?
|
View Answer
|
|
Brief description about local interfaces?
|
View Answer
|
|
What is EJB QL?
|
View Answer
|
|
What is the advantage of using Entity bean for database operations, over directly using JDBC API to do database operations? When would I use one over the other?
|
View Answer
|
|
Can you control when passivation occurs?
|
View Answer
|
|
Can the primary key in the entity bean be a Java primitive type such as int?
|
View Answer
|
|
The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes?
|
View Answer
|
|
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?
|
View Answer
|
|
How EJB Invocation happens?
|
View Answer
|
|
What is Entity Bean and Session Bean ?
|
View Answer
|
|
What is message-driven bean?
|
View Answer
|
|
How many enterprise beans?
|
View Answer
|
|
What are the key benefits of the EJB technology?
|
View Answer
|
|
What are the key features of the EJB technology?
|
View Answer
|
|
What is the difference between EJB and Java beans?
|
View Answer
|
|
What is EJB role in J2EE?
|
View Answer
|
|
What is session Facade in EJB?
|
View Answer
|
|
Explain about the method ready pool?
|
View Answer
|
|
Explain about J2EE application and its components?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All EJB Interview Questions & Answers - Exam Mode /
Learning Mode
|