15 Juni 2008

Heavyweight EJB?

Today I read a post in Adam Biens blog about heavyweightness of EJBs.

His conclusion is that EJB are even lightweight as any other "container" such as Spring, Guice, Pico etc.

And I think his right because the only thing that is really to heavy is the application server and its overloaded functionality! For example IBMs WebSphere with all the possibilities to cluster and and other things that smaller application normally doesn't nead!
But there are better options such as Glassfish.

If I reflect the only feature I really need from frameworks like Spring is Dependency Injection. And this is also provided by EJB3. Additional I need a Persistence Framework such as JPA - but stop - this is also EJB3 and it doesn't matter if I use Spring or EJB3. In contrast with EJB3 I have the Dependency Injection of the EntityManager and this is a big advantage!
Adam writes that Glassfish V3 will be embedable. Then it's no problem to do any JUnit-Tests with my EJBs!

My conclusion is that EJB3 are simpler to use than frameworks like Spring and they have a main advantage: they are based on a standard! So why using any other non standard framework?

Keine Kommentare: