What is the difference between a message-driven bean and a stateless Session Bean?

Source: Internet
Author: User

What is the difference between message driven beans and stateless session beans? -

What is the difference between a message-driven bean and a stateless Session Bean?

 

In several ways, the dynamic creation and allocation
Message-driven bean instances mimics the behavior of stateless session
EJB instances, which exist only for the duration of a participant Method
Call.
In some cases, a message-driven bean instance is dynamically created, which is similar to a stateless Session Bean and only exists during a specific method call.

However, message-driven beans are different from stateless session ejbs (and other types of ejbs) in several significant ways:

However, message-driven beans are significantly different from stateless session beans (including other types of ejbs:

Message-driven beans process multiple JMS messages asynchronously,
Rather than processing a serialized sequence of method CILS.
Message-driven beans process multiple JMS messages asynchronously, rather than the order of method calls.

Message-driven beans have no home or remote interface, and
Therefore cannot be directly accessed by internal or external clients.
The message-driven bean does not have the home and remote interfaces, so it cannot be directly used in internal or external clients.

Clients interact with message-driven Beans only indirectly, by sending a message to a JMS queue or topic.

The client interacts with the message-driven bean and can only be non-direct. By sending a message to the JMS queue or topic.

Only the container Directly Interacts with a message-driven bean
Creating bean instances and passing JMS messages to those instances
Necessary.
Only the container can directly interact with the message-driven bean, create the bean strength, and pass the JMS message to those instances.

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 cils.

The entire life cycle of the message-driven bean of the container Manager. The instance cannot be created or removed by the customer's request or other API calls.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.