Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Facade, Business Delegate

 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is Session - facade different from each other.. as per my understanding they both are to provide simpler interface to the client
 
Lipman Li
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
business delegate usually talk to Session Facade.
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any further explanations?
 
Piotr Gabryanczyk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BusinessDelegate client interface to underlying business components.

For example if SessionFacade A is a business component then BusinessDelegate BDa is a helper object which implements the same interface as as A.

For client it is transparent to use A or BDa but all the JNDI lookups and remote calls are hidden in BDa.

Typical usage of BD is :

BusinessDelegateXXX xxx = new BusinesDelegateXXX();
xxx.someCall(x,y,z);

You see? No try-catch, no JNDI lookup!
 
Piotr Gabryanczyk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is small mistake in previous post.
Should be:

XXXInterface xxx = new BusinesDelegateXXX();
xxx.someCall(x,y,z);
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!