I am developing a real time website using Struts & Hibernate frameworks . I am a beginner to these frameworks & I am not aware of the usage of EJBs. Is it necessary to use EJBs in my webapplication ? Please suggest .
Someone told me not use EJB for new projects, but I think it depends on the architecture/design of your application. I personally like using EJB in my application whenever possible, especially EJB 3 makes things easier and easier to code, but you do not have to.
It would be nice for someone to explain when to use EJB and when not to.
1) Never use EJB 2.X on a new project. EJB 3.X has been out a long time now
2) Use something for transaction management - Spring and EJB are both viable choices, but I think it is best to use something unless you have a really small app.
3) If you are using Hibernate (vs JPA), Spring is going to be smoother than EJB.