Solved

ejb pass by value, pass by reference

Posted on 2011-09-10
2
321 Views
Last Modified: 2012-05-12
i was reading

remote ejb calls (ie execution in different jvm) happen through pass by value
local ejb calls (ie execution in same jvm ) happen through pass by reference

why it happens so. What are advantages, disadvantages, uses, how , when, why we make different calls.
I was not clear on this concept. thanks in advnace
0
Comment
Question by:gudii9
2 Comments
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 200 total points
ID: 36518162
Although this is rather old article (about EJB 2.0)
but the explanation I believe is useful:


http://onjava.com/pub/a/onjava/2004/11/03/localremote.html

0
 
LVL 20

Accepted Solution

by:
a_b earned 300 total points
ID: 36518292
When the ejb and the client are residing in the same jvm it is possible to hand a refernece of the object as both the client and the ejb have access to the same java heap.

However, when the ejb and client are in different jvms the object need to be serilazed and passed to the client and since they donot have access to the same java heap you need to pass by value by serialization.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question