Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

to EJB or not to EJB

 
clive jordan
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

This is a general question which I guess has no 'correct' answer but I am looking for a few rules of thumb when deciding whether to applt EJBs to a particular problem. ANy references to applicability of the technology greatly received!

For small projects, EJBs are usually an overkill but as the project becomes more complex, they become a more attractive solution due to the benefits that come with the container technology (eg transactions security etc).

At the other end of the spectrum, we have massively data-intensive projects, where millions of records are in the database. Even by reducing the amount of data that is represented in an entity bean, there can be situations where the number of beans can become very large, even with the container's best housekeeping efforts.

And what about extracting a very large amount of data via home business methods? EJBs don't seem the best option here in my opinion although perhaps the benefits outweigh the disadvantages.

Any words of wisdom as to when and where EJBs are the right choice (other than something like 'a highly transactional system!' ) ?

Thanks,
Clive
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi clive,

let me know if this article answers to your questions:

http://www-128.ibm.com/developerworks/library/ibm-ejb

Regards
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This won't be an answer but it might be a path to an answer. Make yourself a list of the things EJB is supposed to do for you: Declarative security, bean managed transactions, bean managed persistence, bean pools to reduce object creation & destruction, remote access, cluster support, productivity, ease of deployment, run-time management, etc. There really are quite a few. For each one, rank how well you think EJB does the job from 1 to 5. For example, lots of people rank BMP very low but BMT works well with my requirements today. Maybe your deployment team has never seen it before - big learning curve. Then for each one rank how important it is to your project. Throw in some alternatives like POJO, Spring or Hibernate and see how they stack up, too. You can pretend to be scientific by multiplying how well it works by how much you need it, or just get a feel for whether it hits your high priorities.
[ October 12, 2005: Message edited by: Stan James ]
 
clive jordan
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Thanks for the pointers. The link is very useful, thanks for taking the time. Most appreciated !!

 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're most welcome Clive
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic