File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How the object is passed in EJB?

 
nan sh
Ranch Hand
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2712
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic