wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes to EJB or not to EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "to EJB or not to EJB" Watch "to EJB or not to EJB" New topic
Author

to EJB or not to EJB

clive jordan
Ranch Hand

Joined: Apr 27, 2005
Posts: 39
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

Joined: Feb 17, 2005
Posts: 704
Hi clive,

let me know if this article answers to your questions:

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

Regards


I think, therefore I exist -- Rene Descartes
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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 ]

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
clive jordan
Ranch Hand

Joined: Apr 27, 2005
Posts: 39
Hi Guys,

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

Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
You're most welcome Clive
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: to EJB or not to EJB