• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Facade Design pattern  RSS feed

 
Gaurav Chikara
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We all know that we use Session Facade pattern
When we want to remove network traffic
(by calling entity beans thru session bean)
but my confusion is how does session bean invoke entity beans
can it invoke it simple by importing it
and calling its methods
or do it have to again do the JNDI lookup from session bean also
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Session Bean must perform a JNDI lookup on the Entity Beans that it uses. You could also use the Service Locator pattern with Session Facade, which would allow you to cache references to the Home interfaces of Session Beans used by client applications or Entity Beans used by the Session Beans. You can start here for Sevice Locator.
Craig
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!