Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

When to use EJB?  RSS feed

 
Patt Rikk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this application which is completely database driven, developed in ejb 1.1 and now there are a few major changes to be done. So we were thinking of the possibilities of either upgrading to ejb 2.1 or 3 or otherwise completely moving over to struts or spring.

My question is exactly when and why would you go for Enterprise Java Beans? If my application is going to be web-based application, based on a single server using just one database, then what advantages does ejb holds over struts/spring/jsf? If I need to migrate it over to something else, I need some strong reasons to convince the client. Hope I'll get a few over here.

Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The big key is transactions. Do you many users accessing the same data? Also, Do you have long running transactions such that you want the container to handle to ACID properties of a unit of work. That is really when you want to use EJBs, I highly recommend going to EJB3 if you are going to upgrade and still use EJBs.

You can always code your own transaction management of starting, committing and rolling back.

If you don't need this, then you don't need to use EJB and other web frameworks will work great for you. Can I recommend JBoss Seam? (I work for JBoss, so there is a bias there. )

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!