• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

network calls in SessionFacade

 
S Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/blueprints/patterns/SessionFacade.html

The above link says SessionFacade will reduce network calls made to the server. But how - putting a session bean between client and server - will reduce network calls? We have to still make all the calls to the SessionFacade which is other side on the network. Then how it will reduce network traffic?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The idea is that the SLSB acts as a Remote Facade and also as a Transaction Script. The client sends a Data Transfer Object that contains all the information needed to complete the entire script; the SLSB coordinates/performs all the fine-grained interactions with the business objects on the server on the client's behalf based on the data in the data transfer object.

So the SLSB conducts many interactions with the business objects for the client's one network trip of sending the required information and receiving the results.

In Figure 1 do() replaces doThis(), doThat(), and doMore(). So instead of 3 trips you only have 1.
[ March 28, 2008: Message edited by: Peer Reynders ]
 
S Reddy
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Peer Reynders.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic