消息驱动的Bean和无状态的会话Bean有什么区别?

What is the difference between Message Driven Beans and Stateless Session beans? -
消息驱动的Bean和无状态的会话Bean有什么区别?

 

In several ways, the dynamic creation and allocation ofmessage-driven bean instances mimics the behavior of stateless sessionEJB instances, which exist only for the duration of a particular methodcall.
在一些情况下,动态的创建,分配消息驱动的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, andtherefore 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 bycreating bean instances and passing JMS messages to those instances asnecessary.
只有容器可以直接与消息驱动的Bean交互,创建bean的实力,传递JMS消息给那些需要的实例。

The Container maintains the entire lifecycle of a message-drivenbean; instances cannot be created or removed as a result of clientrequests or other API calls.
容器管理者消息驱动的Bean的整个生命周期,实例不能被客户的请求或者其它API的调用而创建或者移除。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值