Prior to JEE 5 , the JEE/J2EE platform did not go down that well across the developer community. As software evolves and new ideas flow in, it was only natural that JEE 6 would refine and become a better platform.
Spring Framework came into being partly due to the complexity ofJ2EE. But today SF itself is getting large. SF gave you an abstraction on existing frameworks and made it easier to wire different technologies together. But as the complexities in JEE are addressed you have to start thinking if SF is an overkill. OK I did not exactly mean to say that but you need to think about it.
Below are a few notable items from JEE 6 (I do not go into the merits of each nor do I list every new feature):
- Context & Dependency Injection (CDI). This allows for any POJO to be injected into dependent classes. Right now you have the ability to inject container managed resources (such as connection pools, EJB’s). You cannot inject regular POJO objects. JEE6 adds that ability.
- CDI – Introduces annotations such as
- @ManagedBean – Identifies a bean as a container managed bean.
- @Model identifies a model object in a MVC architecture.
- @*Scope annotations such as @SessionScoped which tie an instance of a bean to a scope such as request, session or application.
- @Inject is used to inject managed beans into other dependent classes.
- …and so on…
- CDI allows session beans to be used in place of JSF beans (influenced from Seam obviously). This means you can use session beans in your JSF EL expressions.
- Bean Validations: Set of annotations to apply on java objects so that the validations can be shared between UI and backend tier.
- Eliminate web.xml with new annotations such as @WebServlet, @WebFilter , etc.
- Ability of servlets to respond to asynchronous requests (AJAX). This could greatly simplify the existing mechanisms on the server to handle such requests. Having the servlets take over this allows for more efficient use of server threads vs existing implementations.
- Introducing the concept of web fragments. Basically separate web.xml files so that appropriate frameworks can be configured in their own files.
- JSF 2.0 (includes annotations that let you eliminate the faces-config.xml file, AJAX support, facelets).
- Simplication of EJB in 3.1 (no requirement for business interfaces, singleton beans, asyhnchronous session beans)
- Concept of Profiles to differentiate between different configurations or stacks of JEE…similar to J2ME .See my article on J2ME at
- Ability to package EJBs as part of the WAR file.
- Inclusion of JAX-RS into the JEE spec (REST with JAX-RS).
- Support for JPA 2.0 (notably to me is the inclusion of a Criteria API…such as the one in Hibernate).
While a lot of things have been added into JEE 6, I do not see any NEW path-breaking changes (except for the asynch servlet invocation). Seems to me JEE is playing catch-up with innovations in other OS frameworks (such a Spring,hibernate,etc).
In conclusion – I wonder where the next set of innovations will come from and what form they will take. I like that Spring has introduced “Spring Integration”. This should allow applications to efficiently handle common integration patterns.