aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How Call-by-reference improves Performance in EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How Call-by-reference improves Performance in EJB" Watch "How Call-by-reference improves Performance in EJB" New topic
Author

How Call-by-reference improves Performance in EJB

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

We deployed our Application consisting of EJB2.1 in weblogic 10.3 server.
This below line is appearing on to the console , when i had dtarted the server .
Please tell me how does this increases performance ??



Call-by-reference is not enabled for the EJB 'SchedulerConfigService'. 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.


Please share your views


Save India From Corruption - Anna Hazare.
Jonh Smith
Ranch Hand

Joined: Mar 18, 2010
Posts: 39
From the ejb 3.0 core spec:

3.2.3 Choosing Between a Local or Remote Client View
(...)
• Remote calls involve pass-by-value. This copy semantics provides a layer of isolation between
caller and callee, and protects against the inadvertant modification of data. The client and the
bean may be programmed to assume this parameter copying.
(...)
• Local calls involve pass-by-reference. The client and the bean may be programmed to rely on
pass-by-reference semantics. For example, a client may have a large document which it wants
to pass on to the bean to modify, and the bean further passes on. In the local programming
model the sharing of state is possible. On the other hand, when the bean wants to return a data
structure to the client but the bean does not want the client to modify it, the bean explicitly copies
the data structure before returning it, while in the remote programming model the bean does
not copy the data structure because it assumes that the system will do the copy.



21.2.7 Argument Passing Semantics

An enterprise bean’s remote business interfaces and/or remote home and remote interfaces are remote
interfaces for Java RMI. The container must ensure the semantics for passing arguments conforms to
Java RMI-IIOP. Non-remote objects must be passed by value.

Specifically, the EJB container is not allowed to pass non-remote objects by reference on inter-EJB
invocations when the calling and called enterprise beans are collocated in the same JVM. Doing so
could result in the multiple beans sharing the state of a Java object, which would break the enterprise
bean’s semantics. Any local optimizations of remote interface calls must ensure the semantics for passing
arguments conforms to Java RMI-IIOP.

An enterprise bean’s local business interfaces and/or local home and local interfaces are local Java
interfaces. The caller and callee enterprise beans that make use of these local interfaces are typically
collocated in the same JVM. The EJB container must ensure the semantics for passing arguments across
these interfaces conforms to the standard argument passing semantics of the Java programming language.


Check http://xdoclet.sourceforge.net/xdoclet/tags/bea-tags.html#@weblogic_enable-call-by-reference__0____
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

Please tell me how does this increases performance ??


You meant betters performance? One reason is that with pass by reference, there is no serialization overhead.

ram.
 
Don't get me started about those stupid light bulbs.
 
subject: How Call-by-reference improves Performance in EJB