Java Platform, Enterprise Edition or Java EE is Oracle's enterprise Java computing platform.
The platform provides an API and runtime environment for developing and running enterprise software,
including network and web services, and other large-scale, multi-tiered, scalable, reliable,
and secure network applications.
Java EE extends the Java Platform, Standard Edition, providing an API for object-relational
mapping, distributed and multi-tier architectures, and web services.
The platform incorporates a design based largely on modular components running on an application
server.
Software for Java EE is primarily developed in the Java programming language.
The platform emphasizes Convention over configuration and annotations for configuration.
Optionally XML can be used to override annotations or to deviate from the platform defaults.
Version history
The platform was known as Java 2 Platform, Enterprise Edition or J2EE until the name
was changed to Java Platform, Enterprise Edition or Java EE in version 5.
The current version is called Java EE 7.
J2EE 1.2 J2EE 1.3
J2EE 1.4 Java EE 5
Java EE 6 Java EE 7
Standards and specifications Java EE is defined by its specification.
As with other Java Community Process specifications, providers must meet certain conformance requirements
in order to declare their products as Java EE compliant.
Java EE includes several API specifications, such as RMI, e-mail, JMS, web services, XML,
etc., and defines how to coordinate them.
Java EE also features some specifications unique to Java EE for components.
These include Enterprise JavaBeans, Connectors, servlets, JavaServer Pages and several web
service technologies.
This allows developers to create enterprise applications that are portable and scalable,
and that integrate with legacy technologies.
A Java EE application server can handle transactions, security, scalability, concurrency and management
of the components it is deploying, in order to enable developers to concentrate more on
the business logic of the components rather than on infrastructure and integration tasks.
General APIs The Java EE APIs includes several technologies
that extend the functionality of the base Java SE APIs.
Java EE 7 Platform Packages Java EE 6 Platform Packages
Java EE 5 Platform Packages javax.servlet.*
The servlet specification defines a set of APIs to service mainly HTTP requests.
It includes the JavaServer Pages specification.
javax.websocket.* The Java API for WebSocket specification defines
a set of APIs to service WebSocket connections.
javax.faces.* This package defines the root of the JavaServer
Faces API.
JSF is a technology for constructing user interfaces out of components.
javax.faces.component.* This package defines the component part of
the JavaServer Faces API.
Since JSF is primarily component oriented, this is one of the core packages.
The package overview contains a UML diagram of the component hierarchy.
javax.el.* This package defines the classes and interfaces
for Java EE's Expression Language.
The Expression Language is a simple language originally designed to satisfy the specific
needs of web application developers.
It is used specifically in JSF to bind components to beans and in CDI to name beans, but can
be used throughout the entire platform.
javax.enterprise.inject.* These packages define the injection annotations
for the contexts and Dependency Injection APIs.
javax.enterprise.context.* These packages define the context annotations
and interfaces for the Contexts and Dependency Injection API.
javax.ejb.* The Enterprise JavaBean specification defines
a set of lightweight APIs that an object container will support in order to provide transactions,
remote procedure calls, concurrency control, dependency injection and access control for
business objects.
This package contains the Enterprise JavaBeans classes and interfaces that define the contracts
between the enterprise bean and its clients and between the enterprise bean and the ejb
container.
javax.validation.* This package contains the annotations and
interfaces for the declarative validation support offered by the Bean Validation API.
Bean Validation provides a unified way to provide constraints on beans that can be enforced
cross-layer.
In Java EE, JPA honors bean validation constraints in the persistence layer, while JSF does so
in the view layer.
javax.persistence.* This package contains the classes and interfaces
that define the contracts between a persistence provider and the managed classes and the clients
of the Java Persistence API.
javax.transaction.* This package provides the Java Transaction
API that contains the interfaces and annotations to interact with the transaction support offered
by Java EE.
Even though this API abstracts from the really low-level details, the interfaces are also
considered somewhat low-level and the average application developer in Java EE is either
assumed to be relying on transparent handling of transactions by the higher level EJB abstractions,
or using the annotations provided by this API in combination with CDI managed beans.
javax.security.auth.message.* This package provides the core of the Java
Authentication SPI that contains the interfaces and classes to build authentication modules
for secure Java EE applications.
Authentication modules are responsible for the interaction dialog with a user, verifying
the user's input and retrieving a set of groups/roles that the authenticated user is in or has.
javax.enterprise.concurrent.* This package provides the interfaces for interacting
directly with Java EE's platform default managed thread pool.
A higher-level executor service working on this same thread pool can be used optionally.
The same interfaces can be used for user-defined managed thread pools, but this relies on vendor
specific configuration and is not covered by the Java EE specification.
javax.jms.* This package defines the Java Message Service
API.
The JMS API provides a common way for Java programs to create, send, receive and read
an enterprise messaging system's messages.
javax.batch.api.* This package defines the entry AP for Java
EE Batch Applications.
The Batch Applications API provides the means to run long running background tasks that
possibly involve a large volume of data and which may need to be periodically executed.
javax.resource.* This package defines the Java EE Connector
Architecture API.
Java EE Connector Architecture is a Java-based technology solution for connecting application
servers and enterprise information systems as part of enterprise application integration
solutions.
This is a low-level API aimed at vendors that the average application developer typically
does not come in contact with.
Web Profile In an attempt to limit the footprint of web
containers, both in physical and in conceptual terms, the web profile was created, a subset
of the Java EE specifications.
The Java EE web profile comprises the following: Certified application servers
Differences between implementations Although by definition all Java EE implementations
provide the same base level of technologies, they can differ considerably with respect
to extra features, installed size, memory footprint, startup time, etc.
Code Sample The code sample shown below demonstrates how
various technologies in Java EE 7 are used together to build a web form for editing a
user.
In Java EE a UI can be built using Servlet, JavaServer Pages, or JavaServer Faces with
Facelets.
The example below uses JSF and Facelets.
Not explicitly shown is that the input components use the Java EE Bean Validation API under
the covers to validate constraints.
Example Backing Bean class To assist the view, Java EE uses a concept
called a "Backing Bean".
The example below uses contexts and Dependency Injection and Enterprise JavaBean.
Example DAO class To implement business logic, Enterprise JavaBean
is the dedicated technology in Java EE.
For the actual persistence, JDBC or Java Persistence API can be used.
The example below uses EJB and JPA.
Not explicitly shown is that JTA is used under the covers by EJB to control transactional
behavior.
Example Entity class For defining entity/model classes Java EE
provides the Java Persistence API, and for expressing constraints on those entities it
provides the Bean Validation API.
The example below uses both these technologies.
See also
Web container Deployment Descriptor
Java BluePrints Sun Java System Portal Server
Java EE version history Sun Community Source License
Java Research License References
External links Oracle Technology Network's Java EE
Oracle's Java EE Compatibility page - Certified Java EE Compatible Implementations
Core J2EE Patterns A short tutorial introducing beginning Java
EE developers to the Java EE platform