Check out Does EJB 3.0 really make application development easy ? over on a blog called Loosely Coupled. Its a really great simple example. (PDF version)

 

(Download the PDF version of this article)

After reading through articles and posts regarding how EJB 3.0 is going to make application development simpler, I decided to give EJB 3.0 a spin and see if the claims are true.

I decided to take a publicly available demo application which is part of the J2EE 1.4 tutorials. I took the RosterApp application which has three Entity beans (LeagueBean, TeamBean, PlayerBean), one Session bean (RosterBean), three Data Transfer Objects (LeagueDetails, PlayerDetails, TeamDetails), a Debug utility class and a Client class. I converted/migrated/ported these beans and classes to an EJB 3.0 based application.

I migrated the application with the following steps:
Entity Beans
Data Transfer Objects (DTOs)
Session Bean
Client
and gave my final conclusion.



 

Only some minor nits: The blog can't be valid RSS or XML.

 

Currently there doesn't seem to be any support for using Native SQL queries, though the specification seems to say so. I would have loved to make use of those queries instead EJBQL, as database portability isn't a priority for me.

 

Generally the performance of that isn't worth it, moreover the opportunities for different kinds of appserver-side optimizations should eventually make this a useless feature in serious high-pro apps anyhow. Never say never but I wouldn't do everyday stuff with db specific queries.