• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Business Delegate - Who's the Controller?

 
Rudi Vaum
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)
 
James Ward
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?
 
Ashish Sarin
author
Ranch Hand
Posts: 432
5
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic