Solved

ejb pass by value, pass by reference

Posted on 2011-09-10
2
304 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

810 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