wood burning stoves
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Business Delegate - Who's the Controller? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Business Delegate - Who Watch "Business Delegate - Who New topic

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
b) a Standalone Client
who would check if the client's authorized and so?
(I am not planning to preserve state on the server)

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
Ranch Hand

Joined: Nov 20, 2000
Posts: 432
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 ?
ashish sarin

Author of
Getting started with Spring Framework
Portlets in Action
Spring Roo 1.1 Cookbook
Portlets blogSpring 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?

I agree. Here's the link: http://aspose.com/file-tools
subject: Business Delegate - Who's the Controller?
It's not a secret anymore!