Java EE 5 vs. J2EE 1.4 and some arguments for switching.

I'm over and over asked again about arguments for migration from J2EE 1.4 to Java EE 5. Only some of them:


  1. To develop a Java EE application only a third of all J2EE artifacts is needed. A Session Bean consists of an interface and a class (in J2EE Home, Remote, Class and Deployment Descriptor). You do not need the Service Locator any more, references can be directly injected.
  2. To deploy an CMP 2.0 Entity and Local Home, Local, Class, Deployment Descriptor and an associated Value Object was needed. In EJB 3 world the JPA entity is a simple class and can be detached for transport.
  3. JPA is more powerful - the usage of DAO-pattern can be reduced (another three classes are gone).
  4. Annotations are typesafe - no more "XDoclet" hell. A successful deployment is more likely.
  5. Java EE 5 comes already with installed JSF frameworks. No additional frameworks are needed for an average application.
  6. The tooling is much better.  Eclipse with "dali" plugin supports the developer in OR-mapping of JPA, or JBoss-IDE in the overall process. In Netbeans 5.5/6 (out off the box) provides a support for dependency injection, scaffolding (generation of JSF pages from JPA entities, or generation of JPA-Entities from existing tables), and JMS (injection of queues etc.).
  7. JPA entities are object oriented and polymorph. They do not have to be persistent data containers/mappers only- so they also realize business logic and can be real domain objects. This is a huge advantage in more complex applications over "anemic" CMP 2.X entites regarding development as well as maintenance.
  1. The EJB 3 specification is more complete - so vendors are forced to implement more standardized functionality. Impact: Java EE 5 applications are portable between different vendors. In general case an application can be deployed without proprietary deployment descriptor.
  2. The EJB 3 code is clean and lean. There is no need for code generation. The applications are better to maintain because of more condensed code.
  3. EJB 3 can be easier executed and so tested outside of the container with less effort
The developer's productivity can increase significantly - even without special tools. In the past I used Eclipse + WTP, with JBoss IDE (for the autocompletion of XDoclet-Tags), a predefined Ant-Script with XDoclet task which generated the boilerplate code in J2EE courses. The students were able to built a basic (CRUD) J2EE application with very limited UI capabilities in five days (J2EE Patterns courses with experienced students).
I did the same in Java EE 5 space with a basic editor (I used Netbeans 5.5 in the last courses without additional templates or tooling). The students were to built the application with JMX, WebService-Support, JMS-notification,  and sophisticated Swing UI and JSF support in ...three days. With Visual Web Page (a Netbeans extension), some stundents were even able to do more and created amazing looking JSF-UIs (Grids).

Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition the podcast:

Stay in touch:


Another reason is speed. Java EE 5 is much faster.

I first saw evidence of this from the authors of an EJB 3 book. Recently I've developed my own tests that pits Java EE 5 against CORBA and Sockets. Sockets wins, but Java EE 5 is much faster than CORBA.

I'm thinking about puslishing the results.

Posted by Darrin Smith on March 07, 2007 at 06:53 PM CET #

Another reason is speed. Java EE 5 is much faster.

Posted by Darrin Smith on March 07, 2007 at 06:54 PM CET #

A reason to be with JEE, is easy learning, a bad idea, is the lack of support for webservers, the lack of tutorial's, help,... Even JBoss, is working with J2EE (JBoss AS is J2EE 1.4 certified not JEE certified), you must Download a patch( or module) for EJB3 Support. After that the decision of Hibernate or Toplink... I think that the enterprise environment isn't prepared yet. I'm suffering this because i'm working with JEE5 in my present project. Even that i have to confess i'm in love with JEE5, and i want to write tutorials for newbies. With JEE5, the tutorial is about 6 pages with EJB2 about 66 pages =).

Posted by Roberto Carlos Gonzalez Flores on March 09, 2007 at 02:20 AM CET #

I think JBoss now supports JEE5 fully. Please check the latest version

Posted by Michael Enudi on July 06, 2008 at 11:43 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments