• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session EJB - Inter EJB communication

 
Sridhar Raman
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does one Session EJB talk to another Session EJB? Does it work like a regular Java client requesting a service or does it use any special mechanism given that both SEssion EJBs belong to the same container?
thanks in advance
Sridhar
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even before the local interfaces spec, app server vendors used to optimize the inter-session bean calls if the caller and the called were in the same container. With the local interfaces in place, it has become explicit. It is perfectly okay( and recommended ) to have both remote session beans and local session beans in your architecture.
Hope that answers your question.
 
Sridhar Raman
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Ajith, that helps. What about the lookup mechanism? Does the container handle the lookup calls or does the Session EJB speak to an explicit ServiceLocator class for looking up and getting the handles to another Session EJB?
Regards
Sridhar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic