Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity Object

 
Naichen Liu
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJB Richard Monson Book 2nd edition, on Page [335], it states that "The belief is that passing the entity objects to the client avoids unnecessary network traffic by keeping the set and get methods local", OK, I would think "entity object" as simple data object with bunch of fields, getters and setters.
Then it says "it is true that set and get methods of entity objects can introduces a lot of network traffic" on the the same page. Here "entity objects" seems entity bean to me.
the "entity object" is so confusing here, because if it's entity bean, invoking setters and getters has to go through network, if it's not, the 2nd statement is not understandable.
Can somebody explain? Thanks
 
Eduardo Cobian
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When it says that get and set methods cause a big network traffic,it means invoking these methods through the remote component interface.So, you are talking to the EJB component.
To avoid this network traffic, you must have a coarse-grained get method on the entity bean which gives you a value-object which has get and set methods.The call to these methods, then, is local.
Thas it help?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic