Solved

ejb pass by value, pass by reference

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now