| Author |
Business Delegate - Who's the Controller?
|
Rudi Vaum
Ranch Hand
Joined: May 02, 2003
Posts: 59
|
|
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
Joined: Apr 27, 2003
Posts: 263
|
|
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
Joined: May 02, 2003
Posts: 59
|
|
could u elaborate?
|
 |
Ashish Sarin
author
Ranch Hand
Joined: Nov 20, 2000
Posts: 403
|
|
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
|
Author of
Getting started with Spring Framework
Portlets in Action
Spring Roo 1.1 Cookbook
Portlets blog – Spring Roo blog
|
 |
Rudi Vaum
Ranch Hand
Joined: May 02, 2003
Posts: 59
|
|
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
|
 |
 |
|
|
subject: Business Delegate - Who's the Controller?
|
|
|