11 hot improvements to Java EE 7

HTML5, simplified JMS, an updated Web Profile -- Java Enterprise Edition 7 lays the foundation for a more cloud-centric Java


11 hot improvements to Java EE 7

The latest iteration of the enterprise edition of Java has finally landed. After much anticipation, Oracle took the wraps off Java EE 7 yesterday, and Java engineers can now get their hands on the Java EE 7 SDK and the open source GlassFish 4 application server.

The new iteration includes improvements and tweaks in a variety of areas, including accommodation for HTML5, which Oracle has said will help Java engineers deliver HTML5-scalable applications. Reading between the lines of yesterday’s improvements, Gartner analyst Mark Driver sees Java EE 7 as "a precursor to a more 'cloud-centric' version of Java coming in the next version or two."

Here are the key features that have been incorporated into Java EE 7.


The main focus of Java EE 7 is on HTML5. Specifically, the release is set to deliver enhanced simplification, productivity, and support for the specification, which has been billed as enabling modern, multimedia-enriched Web applications. Support will be offered via accommodations for WebSocket and JSON.


The upgrade is focused on adding "first class" support for WebSocket, considered part of the HTML5 family of technologies. WebSocket provides for two-way communication with a remote host, and Web applications can maintain bidirectional communications with server-side processes.

WebSocket is intended to allow for communication in an HTTP fashion over the Web, says Jonas Jacobi, CEO of Kaazing, which has specialized in WebSocket development. "The WebSocket protocol works by having everything on the wire functioning as a data or control frame," according to Oracle's Java technology evangelist Arun Gupta. "So an API or an SPI for data frames can be defined, enabling developers to manipulate the data frames."


JSON, or JavaScript Object Notation, is a lightweight data interchange format based on JavaScript and featuring a language-independent text format. Many Web services use JSON for invoking and returning data. "HTML5 and WebSockets, JSON, etc., support are critical for next-generation desktop and mobile clients," says Gartner's Driver.

Simplified JMS 2.0 API

A simplified JMS (Java Message Service) 2.0 API will provide for ease of development. The API offers the means for Java programs to create, send, receive, and read enterprise messaging system messages. Version 2.0, released in April, has been slotted as a simplified release.

"The single biggest change in JMS 2.0 is the introduction of a new API for sending and receiving messages that reduces the amount of code a developer must write," according to Oracle. "For applications that run in a Java EE application server, the new API also supports resource injection. This allows the application server to take care of the creation and management of JMS objects, simplifying the application even further."

Groundwork for cloud environments

Java EE 7 sets the stage for cloud enhancements expected to arrive in Java EE 8. Areas to be addressed include resource definition metadata, improved security configuration, and database schema definition.

"Best-case scenario for Java EE is that updates in Java EE 7 and future Java EE 8 will successfully transition the Java platform to the cloud and retain the successful consistency and portability that it has enjoyed over the last decade among traditional server-centric deployments," Driver says. "Worst-case scenario is that Java EE is unable to fully embrace 'cloud native' concepts in a uniform way -- the specs are too weak or incomplete, etc. -- and developers split Java technology up among a family of related but incompatible and proprietary cloud providers."

Batch applications

A programming model is being proposed for batch applications and a runtime for scheduling and executing jobs. JSR (Java Specification Request)-352, Oracle recently said, offers functionality for non-interactive, bulk-oriented, long-running tasks like generating monthly bank statements.

"Batch app capabilities provide a uniform way to handle background and batch processing -- important for migrations from mainframe-based workloads as well as cloud workloads," says Gartner's Driver.

Updated Web Profile

Introduced in Java EE 6 and used for deploying Web applications, Web Profile has been updated in Java EE 7 and is now targeted toward "modern" application development, according to Oracle's Gupta. If a Java engineer does not need JMS, for example, he or she can just use the Web Profile. "JSON and WebSocket are also part of Web Profile as part of Java EE 7," Gupta says. JAX-RS 2.0 is featured in Web Profile, too.

Concurrency utilities

Java EE 7 provides a standardized API for using concurrency from application components without compromising container integrity and preserving Java EE platform benefits. "The concurrency utilities provide support for concurrency design patterns that make it easier for programmers to create applications that take advantage of parallel processing. It's good to have something at higher levels than 'low level' thread management," Gartner's Driver says.

Context Dependency Injection

Context Dependency Injection, introduced in Java EE 6, has been enhanced and is expected to be more broadly utilized by Java EE platform technologies. "[CDI] for the Java EE platform is one of several Java EE 6 features that help to knit together the Web tier and the transactional tier of the Java EE platform. CDI is a set of services that, used together, make it easy for developers to use enterprise beans along with JavaServer Faces technology in Web applications," according to Oracle.

Java API for RESTful Web Services (JAX-RS) 2.0

Java API for RESTful Web Services 2.0 will enable invoking of a REST endpoint in a standard way, Oracle's Gupta has said in a blog post. "We are providing extension points, methods filters, and entity interceptors that improve how to do request and response and how to do pre- and post-processing very easily, which will be useful in addressing cross-cutting concerns, such as logging or security, which you can easily do as part of your REST endpoint."

Servlet 3.1

Java servlet technology has offered Web developers a mechanism for extending Web server functionality and accessing business systems. A servlet can be viewed as a server-side applet. Servlet 3.1 offers non-blocking I/O, an HTTP protocol upgrade mechanism, and security enhancements.

Copyright © 2013 IDG Communications, Inc.