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.
PrasannaKumar Sathiyanantham wrote:then if i want to create a website then there is no need for me to use ejb right..... i can do everything with jsp and servlets........
Not everything. Actually that depends on the type of the application/website. You might use simple JavaBeans for the business tier funtionality along with Servlet/JSP for the web tier. But for more complex functionality you may need EJB as they provide all those services like Transactions, Concurrency etc.. Their (Session Beans,MDB) life cycle is managed by the container.
Joined: Nov 12, 2009
no actually i am just creating a tutorial site and want to add forums and username,passwords and like those things........ can i do that in jsp and servlets alone without ejb.............
i am not going to ask my users to pay money to enter my site