• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Business Delegate - Who's the Controller?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hy everybody
when implementing a Business Delegate, with Service Locator and a coressponding SessionFacade(as stateless session bean)
who gets to play the Controller?
I mean, if i would be accessing the Business Services behind them from
a) a Web-App
AND
b) a Standalone Client
who would check if the client's authorized and so?
(I am not planning to preserve state on the server)

Thanx,
Rudi
SCJP
SCEA(only 1st part)
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of a web app... i think the Controller and the Business Delegate are one and the same.
In case of client, if it is talking to the Controller, then this case is same as above.
If it is not talking to Controller, Business Delegate will be separate.
 
Rudi Vaum
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could u elaborate?
 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of standalone/web applications the Business Delegate is the controller when used with Session Facade. The client only sees the Business Delegate, the delegate can perform the function of retrying for a failed transaction & may also execute some calls locally ( in case the Business Delegate stores some data locally ). So i feel that when used with Session Facade or Message Facade it is ALWAYS the Business Delegate which acts as a Controller.
The Business delegate will call the corresponding session bean (on the Remote Server ) method to validate the user. this data then can be cached locally in the Business Delegate.
does this answers ur query ?
regards
ashish sarin
 
Rudi Vaum
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you communicate such a design in the UML class diagramm? I always think of Mark Cade's case study, where he omitted the controller-servlet, and directly inserted the SLSB in the class diagramm.
I mean, it is really important how u communicate your design, isn't it? I'm sitting in front of my computer, not really knowing what's right and wrong.. :-( I could use some samples, anybody have some ideas where to find them?

thanks
Rudi
SCJP
SCEA I
 
Won't you be my neighbor? - Fred Rogers. tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic