This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Need for EJB's in WebApplication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Need for EJB Watch "Need for EJB New topic
Author

Need for EJB's in WebApplication

Ramesh Jothimani
Ranch Hand

Joined: May 05, 2011
Posts: 70

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

Joined: Mar 17, 2012
Posts: 892
    
    9
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

Joined: Jun 26, 2012
Posts: 13
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

Joined: May 26, 2003
Posts: 30795
    
157

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need for EJB's in WebApplication