Session facade is usually a stateless session bean and delegate is aplain
java class. Now, think of an architecture where you have connection to Database, connection to some lagacy system, you are also using messaging to talk to other system(s) and blah blah blah. In such cases you might have multitier architecture where you might have business components, Data Access Objects and so on. Processing all this becomes very complecated. You use session facade as an entry point to your complicated tiers. Session facade might call methods on business components, or might call Data Access layer for DB operations or might do something else. Main objective of session facade is to hide underlying complexity from client (who calls session facade).
Delegate as the name suggests delegates tasks to the next layer (in many cases facade as Mark said) and hence adds a layer of abstraction (or indirection) between presentation layer and biz layer.
If all this is overwhelming, think of delegate as a door between presentation layer (
servlets,
JSP) and biz logic and think of session facade as a way to access complex systems of back end tier.
Client // in presentation layer
{
Delegate d = new Delegate ();
d.doMyStuff (); // this is all client as to do
}
Delegate
{
// jndi look up on facade
// facade is remote interface below
facade.bizMethodCall ();
}
Facafe
{
// complex stuff
}
Above is very rough idea. People suggest corrections if I said something wrong.
Hope this helps
Chintan