File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: network calls in SessionFacade