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

Transfer Object confusion

 
Simran Dass
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Are not the entity bean and Transfer Object local to one another OR are they remote??
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simran Dass wrote: Are not the entity bean and Transfer Object local to one another OR are they remote??

DTOs (which are simple POJOs) carry data between different layers of the application. With EJB3 you can use simple POJOs as Entity beans as opposed to EJB2s heavily loaded counterparts.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simran Dass wrote:
Are not the entity bean and Transfer Object local to one another OR are they remote??

Both are remote to each other. Since, the EJB is in another JVM, we use transfer object to reduce the network traffic between the layers.
 
Simran Dass
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But is not it that the entity bean is used to create the Transfer object . Before the
transfer object is sent across the network the entity bean and Transfer object are local to each other and once Transfer object is sent then they become remote.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2534
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Simran,

But is not it that the entity bean is used to create the Transfer object . Before the
transfer object is sent across the network the entity bean and Transfer object are local to each other and once Transfer object is sent then they become remote.

Yes, you are right and Vijitha is also correct. With the introduction of EJB3.0 the Transfer Object pattern was not needed anymore for Entity Beans.

Regards,
Frits
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic