PrasannaKumar Sathiyanantham wrote:where do we use ejb.......
EJB composed of different types (i.e: Session Beans,Message Driven Beans,JPA in EJB3) where those have different purposes. Session & MDBs are mainly for the business tier of the application. And JPA is for the persistence (prior to EJB3, Entity Beans were used for thxis).
lets say that i am creating a website with servlets and jsp....
the website posting company has tomcat only........(then will i be able to use ejb or in which case will i use ejb)
Tomcat is a web container not a fully JEE compliant server, so It does not support EJB. There are other application servers which support them like
Jboss, Websphere etc..
Also note that Servlet/JSP are for the web tier.