RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


New Features in Java EE 6

Get a sneak preview of the new modularity and lightweight features in Java EE 6.

ava Platform, Enterprise Edition version 6 (Java EE 6) is quite different from earlier versions. During its 10 years of development (2009 is J2EE/Java EE's 10th anniversary), the platform has matured and grown vibrant by incorporating several APIs and technologies to make it more powerful and complete. However, the focus of Java EE 6 is ease of development and simplicity: that is, supporting all the technologies and frameworks from the enterprise Java community yet still continuing to simplify the platform.

This article discusses the goals for Java EE 6 and explores the new features it introduces: profiles, pruning, and extensibility. It also covers important technologies that have been updated in the release, such as Enterprise JavaBeans (EJB), Java Servlet, and Java Persistence API (JPA), explaining the changes introduced in them through some code examples. Finally, it will highlight two of the new APIs/technologies being introduced as part of the specification: Java API for RESTful Web Services (JAX-RS) and Java Contexts and Dependency Injection (JCDI, previously known as Web Beans).

Java EE 6 Goals

Ease of development was a major goal for the Java EE 5 release. Java EE 6 shares this goal with its emphasis on modularity and being lightweight. In fact, annotations are a major ease-of-development feature introduced Java EE 5 that Java EE 6 continues to support. However, the three main goals proposed for Java EE 6 are:
  • Extensibility: This mechanism provides a way to include additional technologies and frameworks that are not part of the standard platform. Extensibility points and Service Provider Interfaces (SPIs) help developers plug in these technologies to their platform implementations. Two new extensibility options are support for open-source enterprise application frameworks and scripting languages.
  • Figure 1. Web Profile in Java EE 6: Java EE Web Profile is designed for modern web application development.
  • Profiles: For building small- to medium-sized enterprise applications, the entire stack of Java EE APIs may be overkill. Enter Profiles, subsets of Java EE APIs targeting particular classes of applications such as financial, telecommunication, and so on. Profiles build on the standard Java EE platform technologies, sometimes using only a subset of those technologies, and sometimes adding Java technologies that are not part of the standard platform. The idea of profiles comes from various sources such as Java ME, where profiles are applied to specific device runtime environments, and web service standards like WS-I Basic Profile.
    Only one profile is slated for the Java EE 6 release, Java EE Web Profile, which is designed for modern web application development. Web Profile provides transaction processing, security, and persistence management for creating small- to medium-sized enterprise web applications. See Figure 1 for a depiction of Java EE 6 Web Profile technologies. The expert group is expecting community feedback to decide whether to include JCDI in the full platform and/or in the Web Profile.
  • Pruning: Pruning provides a way to remove the following technologies from the platform.
    • Java EE technologies that are outdated and have been replaced by new sets of technologies
    • Technologies that are not well supported
    • Technologies that are not widely deployed
    Developers can use pruning to mark these technologies for removal from the platform. Pruning means application server vendors will no longer have to support the pruned technologies, although they may choose to continue supporting them. Technologies such as Entity Beans and JAX-RPC, for example, are marked for pruning in Java EE 6. They can be pruned from the next version.

The following sections discuss some of the APIs that have undergone major changes in Java EE 6.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date