I've recently attended a conference where "Core J2EE Patterns" was considered backdated right from the moment EJB3 came out.
In general I'm under the impression as well that EJB3 allows a more natural, and less of a straight jacket approach in software design.
What is your opinion?
Do you think EJB3 might need loosening up a bit more in some areas?
"Eppur si muove!"
posted 9 years ago
Hi Gian- There are many answers to this, but the new direction of EJB 3 is clearly in response to criticism that EJB 2.x and earlier was too cumbersome to program, and required additional layers of infrastructure,like the DTO pattern, to use effectively. With JPA entities in EJB 3, DTO's are now a thing of the past. Entities are no longer bound to the EJB container, and can be freely instantiated in any application tier, and passed between tiers, as ordinary POJO's (when marked Serializable). In another example of new-found flexibility, JPA entities may be used effectively with session and message driven beans, leveraging the enterprise services offered by the EJB container, but entities may also co-exist nicely with Spring and other technologies.
In addition to adopting the far more lightweight POJO model for entities, EJB 3 has also added features made popular by Spring, such as container injection and interceptors.