首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Bean的差别

2012-08-24 
Bean的区别What is the difference between Message Driven Beans and Stateless Session beans?消息驱动

Bean的区别
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的调用而创建或者移除。

热点排行