• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Questions: Session Fa�ade to eliminate Inter-Entity Bean Communication?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Reading the �Core J2EE Patterns � Best Practices and Design Strategies�, I have questions about how session fa�ade could eliminate inter-entity bean communication.
In the case of two entity beans (Project, Resource) depending on a single entity bean (Commitment), it is not the best practice of using a composite entity bean encapsulate both �Project� and �Commitment�. (Page 334). The book recommended session fa�ade.
It sounds odd to me.
Before refactoring: An application client calls to the Project Remote Home Interface, and the Project entity bean calls to the Commitment Remote Home Interface. There are two calls to the Remote Home Interfaces.
After refactoring with Session Fa�ade: An application client calls the Session Fa�ade Remote Home Interface. The session fa�ade then calls the Project remote Home Interface. Project entity then calls the Commitment Remote Home interface. There are three calls to the Remote Homer interfaces.
It does not look like that Session Fa�ade reduces the inter-bean communication. Instead, it increases it.
Why is session facades recommended for eliminating inter-entity bean communication?
Thanks a ton in advance.
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi john,
session facade helps by limiting ur n/w calls..(most expensive being remote calls). When the author says inter-bean entity comm here, it is in local address space. so if client c1 calls session SB1 (implemented as facade), its fairly assumed u r calling other ejbs e1...en from SB1 in local space only...only then there is a benefit of this approach..
hope that helps...(off the shelf i tell u facade is used very very extensively in real time scenarios)...
rgds,
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic