shah rah wrote:What is the purpose of having EJB and hibernate in a project?
I thought hibernate is an alternative to EJB? Please clear me on this.
Hibernate shouldn't be thought of as an alternative to EJB, with exception to CMP (container-managed persistence). Hibernate basically gives object/relational mapping functionality. Although EJB does have POJO which provides object/relational mapping. Hibernate is great if you don't want to bother writing SQL, but I much prefer EJB. As far as using both in a project...well sure its can be done (and is supported obviously), but I have never done it, nor found a good enough reason to. Hope that helps.