• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Business Delegate Design Pattern

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I had a question in a mock which reads :
Business Delegate facilitates JSP to communicate with EJBs. is it true or false.

Answer is True.

i am confused.

please explain how it is possible.


Thnks and Regards,
 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why are you confused ?
 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am confused on how JSP can communicate with EJB through Business Delegate
 
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
used to reduce coupling between Web and EJB tiers.

All the request from Web tier to EJB tier goes through Buisness Delegate, So that, if something changes in EJB Tier will not affect Web Tier and vice versa.

Normally, For an application J2EE design pattern flow will be something like,

---> Service Locator
|
Client --> Front Controller --> Business Delegate --|
|
|
----> Session Facade


In the above figure, If you see all the interaction between VIEW(JSP) to Business Tier(EJB tier) goes through Business Delegate.

hth,
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, figure got messed up.

used to reduce coupling between Web and EJB tiers.

All the request from Web tier to EJB tier goes through Buisness Delegate, So that, if something changes in EJB Tier will not affect Web Tier and vice versa.

Normally, For an application J2EE design pattern flow will be something like,




In the above figure, If you see all the interaction between VIEW(JSP) to Business Tier(EJB tier) goes through Business Delegate.

hth,
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes,J2EE clients(JSPs) interact with service components, such as Enterprise JavaBeans (EJB) which provide business services ,through Business Delegate .Business Delegate uses service locator to locate these business services .
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Other than perhaps for retrieving a collection for populating a select dropdown box, a JSP should not be making any calls to the back end. Calls to the back end are typically business-related and belong in the controller classes.
 
KRK Gowda
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thnx Marc for your reply
 
navat venu
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Other than perhaps for retrieving a collection for populating a select dropdown box, a JSP should not be making any calls to the back end. Calls to the back end are typically business-related and belong in the controller classes



Hi Marc,
Normally we do retrieve a collection for populating a select dropdown box in the "load-on-startup" servlet itself and do data caching in memory(Application variables),so that call to backend is done only once at the application startup and further, jsps which have dropdown box will retrieve the collection from memory rather than making calls to backend every time.

correct me if i am wrong!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic