In EJB Richard Monson Book 2nd edition, on Page , 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
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?