Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need for EJB's in WebApplication

 
Ramesh Jothimani
Ranch Hand
Posts: 70
Android Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .

Thanks !
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this section of the EE tutorial. http://docs.oracle.com/javaee/6/tutorial/doc/gipmb.html
It lists the scenarios where you might want to use EJBs.
 
Kevin Sheng
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34681
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic