• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Entity Object

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic