The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Questions: Session Fa�ade to eliminate Inter-Entity Bean Communication? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Questions: Session Fa�ade to eliminate Inter-Entity Bean Communication?" Watch "Questions: Session Fa�ade to eliminate Inter-Entity Bean Communication?" New topic
Author

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

John Wen
Greenhorn

Joined: Nov 20, 2003
Posts: 15
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.


X. John Wen<br />SCEA, SCWCD, SCJP, MCAD.NET, MCDBA, MCP
Nishant Anshul
Ranch Hand

Joined: Sep 10, 2003
Posts: 72
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,


SCEA-I, BCJP<p>IBM (India)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Questions: Session Fa�ade to eliminate Inter-Entity Bean Communication?