Hi , Who implements Facade pattern. (Select One) 1. EJBObject 2. EJBHome 3. Remote Interface 4. Bean Class Regards, Chetan Mehta
John Bateman
Ranch Hand
Joined: Mar 09, 2000
Posts: 320
posted
0
Originally posted by Chetan,Mehta: Hi , Who implements Facade pattern. (Select One) 1. EJBObject 2. EJBHome 3. Remote Interface 4. Bean Class Regards, Chetan Mehta
Hi These classes don't actually 'implement" a Facade pattern in the classic sense of Java. (I.E. public class SomeObject implements Facade {}) An example of a facade: If I was working on an application that had 3 tiers (presentation / business and data), then I might want to make working with the EJB's on the data tier easier for the guys programming the business tier. One (of many) tactics could be instead of the business tier doing all the JNDI lookups and instantiating the EJB objects (create etc), I could create a Facade that acts as the glue between the busines and data layer. Then all calls to the EJB would be made through the Facade instead. It would look like regular method calls to a 'normal' java object, but inside the facade would have all the bells and whistles to get my EJB objects. If you are going to get into design Pattens I sugest picking up one of the books discussed in the bunk house on this site. I also subscribe to the j2EE-Patterns Interest mailing list. It's very informative on this subject. I hope this at least points you in the right direction to begin with.
SOURCE CODE should be SURROUNDED by "code" tags.
ruilin yang
Ranch Hand
Joined: Feb 25, 2001
Posts: 334
posted
0
John, Would you please tell me how to subscribe to the j2EE-Patterns Interest mailing list. Thanks, Ruilin
Tony Alicea Senior Java Web Application Developer, SCPJ2, SCWCD
Manjunath Reddy
Ranch Hand
Joined: Jul 26, 2001
Posts: 60
posted
0
Basically session facade pattern is used to wrap business use-cases, in the sense, a particular business case method which might involve one or many ejb's is fulfilled through the session bean by using the sessionfacade pattern. Session facade is an abstract architecture term to define this kind of encapsulation. Hence any object that implements sessionBean is the one that implements(tho not the right word to use) session facade. thx, mpr