This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes network calls in SessionFacade Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "network calls in SessionFacade" Watch "network calls in SessionFacade" New topic
Author

network calls in SessionFacade

S Reddy
Ranch Hand

Joined: May 17, 2007
Posts: 45
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

Joined: Aug 19, 2005
Posts: 2922
    
    5
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

Joined: May 17, 2007
Posts: 45
Thank you Peer Reynders.
 
Don't get me started about those stupid light bulbs.
 
subject: network calls in SessionFacade
 
Similar Threads
EJB - Local interface
SessionFacade pattern needed for EJB3.0?
what is session facade design pattern
Session Facade
session facade