title: EJB - Home/Remote and LocalHome/Local interfaces
body: <p>Revising some past exam papers for an exam mainly focus on component-oriented design and J2EE, I have come across the following question:</p>
  
  <p><em>A preliminary investigation of scenario 3: “Exchange Request” suggests that two EJBs will provide a suitable solution: a session bean called EnterExchangeRequest to control the processing and an entity bean called ExchangeRequest to represent the persistent properties of the request. Discuss the role of the following interfaces:</em></p>
  
  <ul>
  <li>Home</li>
  <li>Remote</li>
  <li>LocalHome</li>
  <li>Local</li>
  </ul>
  
  <p><em>and how they would provide access to the services of the EJBs described above.</em></p>
  
  <p>I could try to explain how <code>Home</code> and <code>Remote</code> interfaces would fit into the picture. I have also heard the lecturer say one could replace <code>Home</code> by <code>LocalHome</code>, and <code>Remote</code> by <code>Local</code> (why?), but why are they asking me to discuss the role of all four at the same time?</p>
  
  <hr>
  
  <p>Do I get it right when I say, the <em>EJB container</em> (the application server) would see that an interface is <code>Home</code> or <code>Remote</code> and then decide that the bean can 'live' on any machine in the cluster, while in the case the interfaces are <code>LocalHome</code> and <code>Local</code> the container will know that the beans can't be distributed across multiple machines and will therefore keep them 'alive' in one machine only?</p>
  
  <hr>
  
  <p>I am totally lost in this enterprise Java jungle. I am experiencing a BeanOverflow. Could you please tell me which of my assumptions are wrong, point out my misconceptions and blunders. </p>
  
  <p>Thank you all who are willing to help me with these EJB interfaces.</p>
  
  <p>P.S. Note that I am not asking you to answer the question from the past exam paper. Just curious if you have any thoughts as to what could they be after when asking this.</p>