str*_*cer 13 performance ejb weblogic
我收到了消息
<Warning> <EJB> <BEA-010202> <Call-by-reference is not enabled for the EJB 'myEjb'.
The server will have better performance if it is enabled. To enable call-by-reference, set the enable-call-by-reference element to True in the weblogic-ejb-jar.xml deployment descriptor or corresponding annotation for this EJB.>
Run Code Online (Sandbox Code Playgroud)
和
<Warning> <EJB> <BEA-012035> <The Remote interface method: 'public abstract java.util.Collection my.sessionfassade.ejb.myFassade.myMethod(java.lang.String,java.lang.String,java.util.Collection) throws my.Exception' in EJB 'myEjb' contains a parameter of type: 'java.util.Collection' which is not Serializable. Though the EJB 'myEjb' has call-by-reference set to false, this parameter is not Serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is Serializable.>
Run Code Online (Sandbox Code Playgroud)
为什么默认情况下不启用此功能,因为如果标志设置为True,远程调用仍然可以通过值完成?设置为True时是否有任何负面影响?
Bre*_*ail 14
call-by-reference = true不符合EJB规范.
远程EJB的目标是提供位置透明性.换句话说,如果目标EJB位于另一个JVM中,那么显然必须以某种方式将数据复制到该JVM,因此为了保持一致性,还会复制对同一JVM中的EJB的调用.如果未复制对同一JVM中的EJB的调用,则调用者/被调用者不会知道他们是否需要防御性地复制ArrayList.通过始终复制,这种模糊性被消除,但代价是性能.
如果您可以完全信任同一JVM中的所有客户端和EJB,并且您在必要时建立了复制数据的约定,那么您可以启用call-by-reference = true.
| 归档时间: |
|
| 查看次数: |
9952 次 |
| 最近记录: |