• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How Call-by-reference improves Performance in EJB

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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____
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic