Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clarification using Session Facade

 
dbala subramaniam
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have SessionFacade(StatefullSessionBean)-ties business objects which are few Entity Beans,1-StatefulSessionBean(Since ShoppingCart),1-Stateless Session Bean(CreditCard Processing).
Is it acceptable architecture in SessionFacade Pattern.
Is it always with Facade(SFSB or SLSB) with EntityBeans?
or Facade with only SessionBeans
My doubt is IS it Facade with Business objects (Combination of Entity,Session-(Stateful),Stateless)
please clarify
Advanced Thanks
with regards
bala
 
Christian Ebage
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is acceptable, since your facade decouples your client from complex relationships between low-level business objects (your ShoppingCart-bean,your CreditCard Processing-bean,and your entity beans). This would also reduce the number of network calls from the client, which are the problems this Design pattern solves.
Your session facade could either be a stateful or a stateless session bean.
You cannot implement an entity bean as a session facade, however you have the composite entity design pattern which allows you to implement an entity bean as a facade to manage other entities (persistent objects). This also reduces the number of network calls from the client side, since you must not implement every persitent object as an entity bean (assuming you are using EJB 1.1 or lower version).
Ebage
SCJP
SCEA
[ July 28, 2003: Message edited by: Christian Ebage ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic