dcsimg
what is sessionfacade and why do we go for this. how to get reference of a sessionbean from another sessionbean
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vijayan_marimuthu
Posted On:   Saturday, July 8, 2006 03:03 PM

what is sessionfacade and why do we go for this.


how to get reference of a sessionbean from another sessionbean.

Re: what is sessionfacade and why do we go for this. how to get reference of a sessionbean from another sessionbean

Posted By:   Gerrit_Grobbelaar  
Posted On:   Tuesday, July 11, 2006 11:41 AM

First, a simple definition of the SessionFacade:


Using a SessionBean as a facade shields your clients from your
business (subsystem) components, thereby making interactions
much easier for your clients, as they only need to work with
your facade.



A few reasons why you would like to go for it:

- weak coupling between your clients and your business components

- it provides one place of control (in your SessionBean implementation you control with which business components must it interact)

- exposes uniform API to your clients



Please see http://java.sun.com/blueprints/corej2eepatterns/Patterns/SessionFacade.html for more details regarding the SessionFacade pattern.



You can obtain a reference to another SessionBean from a SessionBean, by just creating the SessionBean instance you require via its LocalHome interface (please note this answer is with the EJB 2.1 spec in mind).



HTH

Gerrit
About | Sitemap | Contact