aspose file tools*
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 Spring in Action this week in the Spring 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
Author

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 ]
 
jQuery in Action, 2nd edition
 
subject: How the object is passed in EJB?