SFSB 可以被一个客户端同时访问吗?
我知道有状态 EJB 可以由特定客户端同时访问。容器正在序列化请求并一个接一个地执行它们。
问题是 - 您能否设置 EJB 容器以允许并发访问 SFSB?
我知道我有一个 @AccessTimeout
,它允许我配置 SFSB 可以被特定客户端同时多次访问。但是,它允许我指定根本不允许并发访问,或者让容器序列化请求。
EJB规范禁止这样的事情吗?我知道我可以使用 @ConcurrencyManagement
实现 Singleton EJB 的并发访问,但我只是好奇是否可以设置一些特定于供应商的配置属性以允许 SFSB 的这种行为。
提前致谢!
I know that a Stateful EJB can be accessed concurrently by a particular client. The container is serializing the requests and execute them one after another.
The question is - can you set the EJB container to let the concurrent access to the SFSB?
I know that I have a @AccessTimeout
which allows me to configure that the SFSB may be accessed at the same time more than once by the particular client. However, it allows me to specify that the concurrent access is not allowed at all or let the container serialize the requests.
Does the EJB specification forbids such thing? I know I can achieve concurrent access with the Singleton EJB using @ConcurrencyManagement
, but I'm just curious if it's possible to set some vendor-specific configuration property to allow such behavior for SFSBs.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就在上个月,提交的 JIRA 问题正是提出了这样的建议: http://java.net/jira/浏览/EJB_SPEC-24
Just last month a JIRA issues was filed that proposes exactly this: http://java.net/jira/browse/EJB_SPEC-24
EJB 规范不禁止供应商扩展,因此理论上,供应商可以实现扩展以允许同时访问有状态会话 bean。实际上,我不知道有任何允许这样做的。
The EJB specification does not forbid vendor extensions, so in theory, a vendor could implement an extension to allow stateful session beans to be accessed concurrently. In practice, I'm not aware of any that allow that.