Java EE 7 in Liberty

Liberty supports the full Java™ Platform, Enterprise Edition (Java EE) 7, which provides a number of improvements over previous Java EE versions.

Benefits of Java EE 7

  • Easier delivery of HTML5 dynamic scalable applications for desktops, tablets, and smartphones through Java EE 7 Web Profile

    Java EE 6 introduced Web Profile to assist developers of dynamic web applications, providing technologies such as Enterprise JavaBeans (EJB) Lite, Java Persistence API (JPA), and Java Transaction API (JTA).

    Java EE 7 Web Profile adds support for HTML5. Two new technologies, WebSocket and JSON, speed up data exchanges and simplify data parsing for portable applications. Updates to existing technologies, JAX-RS 2.0, Java Server Faces (JSF) 2.2, and Servlet 3.1 enhance your ability to develop dynamic HTML5 applications. For example, JAX-RS 2.0 provides asynchronous response processing through scalable, high performance RESTful Services.

  • Increased developer productivity

    A simplified application architecture reduces the amount of boilerplate code needed for business logic, such as in JMS 2.0 and the JAX-RS 2.0 client API. A more robust POJO development model enables broader use of annotations, such as in JAX-RS 2.0 Interceptors and Filters and in CDI. Bean Validation 1.1 offers method-level validation.

  • Improved support for enterprise demands

    Java EE continues to support enterprise demands with Java EE Connector Architecture (JCA), Java Transaction API (JTA), and Java Message Service (JMS). Java EE 7 introduces the ability to write batch applications in Java that use a standard API and are portable across multiple runtimes. Batch Applications enables better use of computing resources by shifting processing times to when resources are typically idle. Concurrency Utilities enables developers to write scalable applications that integrate with the Java EE runtime in a secure, reliable manner.

  • Deprecation of older technologies

    Older technologies are optional: Application Deployment (JSR-88); JAXR, for interfacing with UDDI registries (JSR-93); JAX-RPC, for XML-based RPC (JSR-101); and EJB 2.x Container Managed Persistence, which Java Persistence API (JSR-338) replaces.

Java EE 7 full platform and Web Profile

The Java EE 7 specification defines the full platform Enterprise Edition. The Web Profile is a properly defined subset of the full platform.

Web Profile
The Web Profile defines a reasonably complete stack that targets "modern" web applications. This stack is a subset of the full platform standard APIs, capable of addressing the needs of most web applications.
Full platform
The full platform defines the full complement of the Java EE programming model. Besides the Web Profile features, the full platform has specifications for advanced business capabilities that an enterprise needs, such as for connectivity, security, enterprise beans, messaging, and application clients.

You need to consider these definitions when you install Liberty and its available features. Installation options provide the Liberty runtime (kernel) as well as features that support the full platform or Web Profile. You can choose to install the Liberty kernel with just the Web Profile features or install individual Java EE features to your existing Liberty kernel installation.

You also need to consider the definitions when you deploy applications to a Liberty server. For example, if your Liberty installation supports Web Profile features but your application needs a server that supports enterprise connectivity APIs, you must add full platform features to your Liberty installation or deploy the application to a Liberty installation that has full platform features.

To quickly add support for Java EE to your Liberty server, use either the webProfile-7.0 or javaee-7.0 convenience features in the feature manager of your server configuration; for example:

<featureManager>
   <feature>javaee-7.0</feature>
</featureManager>

A third convenience feature, javaeeClient-7.0, is also available to quickly configure an application client component:

<featureManager>
   <feature>javaeeClient-7.0</feature>
</featureManager>

Installing a Liberty kernel with Java EE 7 features

You can install a Liberty runtime with Java EE 7 features by using a developer tool such as WebSphere Application Server Developer Tools for Eclipse. See Installing Liberty Repository assets.

You can add Java EE 7 features to an existing installation by running the featureManager or installUtility command. See Installing Liberty Repository assets.

Resources to help you get started using Java EE 7 technologies