Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How the object is passed in EJB?

 
nan sh
Ranch Hand
Posts: 167
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic