EJB3 - 另一个bean接口的Session Bean调用方法 [英] EJB3 - Session Bean calling method of another bean interface

查看:105
本文介绍了EJB3 - 另一个bean接口的Session Bean调用方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小问题...
我在访问仅在bean的远程接口中声明的方法而不是在本地接口中的方法之间搜索本地访问的差异...

I have a little question... I search the difference in local access between accessing a method that is only declared in the remote interface of a bean and not in the local interface...

接口声明(远程或本地)是否确定了方法的访问协议?或者ejb容器是否理解两个bean都在运行相同的JVM?
有很大的性能差异吗?
您对此有任何消息来源吗?

does the interface declaration (remote or local) determine the access protocol of the method? or does the ejb container understand that both beans are running the same JVM? is there a big performance difference? Do you have any source about this?

BR's

Laurent

推荐答案

我建议你在EJB容器上测试一下。

I would suggest testing it on your EJB container to be sure.

那就是说,根据规范(此处,第3.2.3节)@Remote界面必须使用by-value参数传递,而@Local假定by-reference参数传递。

That said, according to spec (here, section 3.2.3) @Remote interface must use by-value parameter passing, while @Local assumes by-reference parameter passing.

这意味着即使客户端和@Remote bean都在同一个JVM上,也会产生参数复制的开销。

That means that even if both client and @Remote bean are on the same JVM there is an overhead of parameter copying.

这也意味着所有@Remote参数都必须是可序列化的。

It also means that all @Remote parameters must be Serializable.

这篇关于EJB3 - 另一个bean接口的Session Bean调用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆