Shaun Abram
Technology and Leadership Blog
JEE
So what exactly is JEE?
JEE, or Java Enterprise Edition, is a set of components and libraries from Sun which as used to build industrial, or ‘Enterprise’, strength applications.
Naming
As of version 5, the platform has been renamed to Java EE, or just JEE, where as the previous version was called J2EE (Part of Sun’s ongoing confusing naming conventions, where Java 2 actually referred to Java 1.4!)
What does Java EE contain?
Well JEE essentially consists of 2 things: Components and APIs, with both relying and being built on Java SE (Standard Edition).
Components include
- Client components including web clients, Applets and Application Clients
- Servlets/Java Server Pages (JSPs)/JavaServer Faces (JSFs)
- EJBs
As well as APIs for the components mentioned above, other APIs include
- Java Mail
- Java Messaging Service (JMS)
- Java Transaction API (JTA)
- Java Management Extensions (JMX)
- JAX-RPC
- Java-WS
- Java Persistence API
- RMI
- JDBC
A component is a self contained piece of software that is assembled into a JEE application.
Components will run within a container, with each component type having its own container. For example,
- Web clients run within a browser
- Applets run within a browser & Java plugin
- Application Clients run within an Application Client Container
- Servlets/JSPs run within a Servlet Container such as Tomcat
- EJBs run within an EJB container such as JBoss
Note that most JEE application servers, such as Glassfish, WebSphere or JBoss will provide both a Servlet container and the EJB container.
It is the containers, whose behaviour and interaction with the components is dictated by the various JEE specs, that really bring the power to JEE. Non-EE applications can be cumbersome to write because they need to contain code to deal with many issues that are not core to the business issue at hand, such as security, trancsaction and state management as well as resource and thread pooling. The JEE containers take care of much of this grunt work with each component able to configure the desired behavior for such issues rather than have it written from scratch.
What has changed in JEE 5 from pervious versions?
JEE5 generally seems to be view as a much simpler, and hence more usable version of Java EE. Amongst many other things, the changes in JEE5 include
- JSF spec included as part of Java EE (previously JSF was independent of J2EE)
- Intro of Java Persistence API
- Java Persistence API is supposed to draw upon the best ideas from persistence technologies such as Hibernate, TopLink, and JDO.
It is a POJO persistence API containing a full object/relational mapping specification supporting the use of Java language metadata annotations and XML descriptors to define the mapping between Java objects and a relational database. It supports a rich, SQL-like query language and was originally developed to simplify the much criticized EJB CMP entity bean before being released as an API in its own right.
- Intro of EJB 3.0, which includes
- Simplified EJB API
- Replacement of the old EJB2.1 entity beans with “perisstence entities” which as POJOs that use the Java Persistence API, heralding the end of the much criticised CMP (Container Managed Persistence).
- Intro of a business interface, replacing the older separate remote and local interfaces
- JAX-WS
A new programming model for Web services that replaces/augments JAX-RPC
Follow on reading
For complete documentation check out Sun’s JEE pages at
http://java.sun.com/javaee/technologies/javaee5.jsp
IBM article on JEE5 :
http://www.ibm.com/developerworks/websphere/library/techarticles/0707_barcia/0707_barcia.html
http://java.sun.com/developer/technicalArticles/J2EE/jpa/
http://java.sun.com/javaee/overview/faq/persistence.jsp