Java EE – why not use session beans instead of message driven beans?

I wonder, why not use session beans instead of message driven beans?

If you can call remote methods from EJBs, why send / receive messages with message driven beans (which are more difficult to develop than session beans)?

Under what circumstances do message driven beans become useful?

Solution

Well, they don't have the same purpose. Message - driven beans allow Java EE applications to process messages asynchronously

Because MDB gives you asynchrony and loose coupling, this may require / require:

>Long term work > when resources are not always available > when you want to parallelize processing

By the way, I personally always think that MDB is the easiest enterprise bean to develop

Look up

You can also have a look

> What Is a Message-Driven Bean?

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>