File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes How the object is passed in EJB? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How the object is passed in EJB?" Watch "How the object is passed in EJB?" New topic

How the object is passed in EJB?

nan sh
Ranch Hand

Joined: Jan 05, 2001
Posts: 167
We know in Java, Objects are passed around by reference.
Come to Ejb, for example, Object A in URL1 wants to pass Object b to Objects C in URL2. If Object B only tell object C a reference of object B, it will overheat the NetWork, if Object C using Object B a lot.
My question is in EJBean, objects are till been passing by reference?
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
If you are using local interfaces then the object will always be passed by reference (only clients within the same JVM can use the local interface). If you are using remote interfaces and the client is in the same JVM as the ejb then most Application Server will default to pass by reference. If the client is in a separate JVM then the object MUST be passed by value.
If you want more detail I suggest you read the EJB 2.0 Specification.
[ December 22, 2002: Message edited by: Chris Mathews ]
I agree. Here's the link:
subject: How the object is passed in EJB?
Similar Threads
passed 1.4 with 95%
Passed IBM 483
Passed By Reference?
A question about passed by value
Passed 700,701 and 340 last Thursday