Solved

ejb pass by value, pass by reference

Posted on 2011-09-10
2
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

688 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