• 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
Posts: 3953
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
Posts: 2785
175
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
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!