How to make a call to ejb a local instead of remote and what is the role of session facade in this procedure

Showing Answers 1 - 2 of 2 Answers

Sejal S

  • Aug 18th, 2006
 

Hi,

Making a local call to another EJB sure requires making a JNDI call. But, it doesn't involve the overhead of 'narrowing' operation. i.e. The local call doesn't require the usage of javax.rmi.PortableRemoteObject.narrow() method to marshall the call via RMI. A simple JNDI lookup and appropriate typecast suffices.  

The Session Facade is a design pattern used for reducing multiple method calls over a network. For eg: for a particular business operation there may be a need to make multiple method calls to various entity beans. In this case, a session bean can be implemented as a facade which would access these entity EJBs to make the method calls. Thus, a client makes a single network call to this session bean and the bean in turn accesses the various entity beans locally thus reducing the calls over a network.

Sejal S

VishwasGenius

  • Oct 4th, 2006
 

HI!

  Sejal Send me important tips that can helpful for all of us

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions