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)
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.
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
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?