Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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?
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic