訊息驅動的Bean和無狀態的會話Bean有什麼區別?

來源:互聯網
上載者:User

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

訊息驅動的Bean和無狀態的會話Bean有什麼區別?

 

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.
在一些情況下,動態建立,分配訊息驅動的Bean的執行個體與無狀態的會話Bean很類似,它只存在於特定的方法調用期間。

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

但是,訊息驅動的Bean與無狀態的會話Bean(包括其它類型的EJB)有一些顯著的不同:

Message-driven beans process multiple JMS messages asynchronously,
rather than processing a serialized sequence of method calls.
訊息驅動的Bean處理多個JMS訊息是非同步,而不是方法調用的順序的。

Message-driven beans have no home or remote interface, and
therefore cannot be directly accessed by internal or external clients.
訊息驅動的Bean沒有home和遠程介面,所以不能在內部或者外部的用戶端直接使用。

Clients interact with message-driven beans only indirectly, by sending a message to a JMS Queue or Topic.

用戶端與訊息驅動的Bean互動,只能非直接的,通過發送一個訊息給JMS隊列或者主題。

Only the container directly interacts with a message-driven bean by
creating bean instances and passing JMS messages to those instances as
necessary.
只有容器可以直接與訊息驅動的Bean互動,建立bean的實力,傳遞JMS訊息給那些需要的執行個體。

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.

容器管理者訊息驅動的Bean的整個生命週期,執行個體不能被客戶的請求或者其它API的調用而建立或者移除。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.