Tuesday, November 29, 2011

Already we have http session in servlets. so why we use session beans ejb?

Remember EJB is an API for distributed computing, it can be accessed form different client (CORBA, Thick Clients like Swings or stand alone Java programms etc..), including Servlets or JSP (Thin Client) which has HTTPSession for maintaining client specific data for intermediate calls to webcountainer since HTTP is stateless protocol. So EJB Spec has an Statefull Session Bean for this reason to retain client specific data in Application Layer (EJB Countainer). I have designed and developed so many application rarely I have gone for Statefull Session Bean since it is a overhead to EJB Countainer since they are not pooled.
Category:EJB Interview Questions

No comments:

Post a Comment