File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Difference between Session Facade and Business Delegate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Difference between Session Facade and Business Delegate" Watch "Difference between Session Facade and Business Delegate" New topic

Difference between Session Facade and Business Delegate

Joe Man
Ranch Hand

Joined: Feb 17, 2002
Posts: 71
Whats the different between Session Facade and Business Delegate design pattern?

Sun Certified Web Component Developer for the J2EE Platform<br />Sun Certified Programmer for the Java 2 Platform
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5382

"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
Admittedly there are a few slightly different slants on this, but I like to think of a session facade as being a way of grouping/performing functionality on one or more entity beans. In other words, a session bean would hide away access to one or more entity beans, therefore providing a good way to encapsulate functionality, demarcate transactionality and, of course, reduce the network overhead of the client manipulating multiple entity beans.
A business delegate on the other hand, for me anyway, is a way of providing a further abstraction of the functionality provided, typically, by one or more session facades. There are a couple of benefits in doing this as it reduces the coupling between the client and the components running on the server, and additionally it can provide a much simpler client interface. A side-effect of this, and depending on how you implement it, is that you can negate the need for the client to get involved with the complexities involved with locating remote services and handling the various exceptions that might get thrown. In terms of the interface it provides, it can either act as a proxy or a mediator.
Business delegates are usually implemented as regular JavaBeans, that when constructed look up the facade(s) that it will make use of and cache them for future use. The client then uses the interface of the business delegate, which in turn hides all those nasty RemoteExceptions by instead catching them and rethrowing business related exceptions.
Check out the patterns forum on and the previous link for more information, and also for additional implementation options and strategies.
Hope that helps
I agree. Here's the link:
subject: Difference between Session Facade and Business Delegate
jQuery in Action, 3rd edition