Skip to content

DEVOXX conference Day 1 key notes: JEE 6.0

Today we had the first conference day at DEVOXX, the European JAVA meeting. The key note was, as usual, dedicated to new evolutions in the JAVA world. One of these topics was the new JAVA EE 6.0

The new and noteworthy in JAVA EE 6.0

The master words for describing the SUN effort are flexibility, modularity and extensibility. A lot of new things comes from the OSGI orientation of the JEE specification.

The final JEE 6.0 is planned for December 10 2009 and Glassfish[2] is still the official reference implementation.  The new features are:

  • A new set of API
  • The Web profile
  • Plugability/extensibility
  • Dependency injection
  • Improvement of existing API

 

New API

The JAX-RS

A REST FULL Web service API which is annotation-based enables to call and receive REST request.

Bean validation API

Bring the concept of JSF validation within the EJB and completely integrated with JSF and JPA.

@NotNull String  name;
@size(Max=40) String address

Or even custom one @email String mail; on which the developer can define its own constraint.

The Web profile

Who has never said something like “when I create a JEE application do I need to load the whole JEE framework, isn’t too heavy, just for a web app?”. The idea behind the web profile is to provide, just and only, the set of J2EE components needed for Web development. However, in this profile you will find a lot of JSRs such as:

  • Servlet 3.0
  • JavaServer Pages (JSP) 2.2
  • ExpressionLanguage (EL) 2.2
  • Debugging Support for Other Languages (JSR-45) 1.0
  • Standard Tag Library for JavaServer Pages (JSTL) 1.2
  • JavaServer Faces (JSF) 2.0
  • Common Annotations for Java Platform (JSR-250) 1.1
  • Enterprise JavaBeans (EJB) 3.1 Lite
  • Java Transaction API (JTA) 1.1
  • Java Persistence API (JPA) 2.0

 

Apache [3] gives this definition of web profile: “The JEE 6 web profile is a specified minimal configuration targeted for small footprint servers that support “typical” web applications.”

Modular web applications

There are several interesting things in the new modular approach of the specification manly all based around the new OSGI integration. Indeed, OSGI is in the core of the new JEE specification.   We can cite the notion of library which can be a web fragment, a part of a web application. In addition, a simple OSGI bundle which expose a service can be injected directly in a JEE component such as a servlet or a managed-bean. That’s really a great improvement.

We can also cite the notion of ServeltContainerInitializer which aims the developer to look-up into the different application components to browse the annotation for registration services or resources for instance.

Dependency injection

That’s nothing else than the JSR 299 and JSR  330.
A bunch of new annotation such as @Resource Datasource myDB; or even @inject @Loggedin User user.

We can see that the specification tends to get close to frameworks such as Seam or Spring. However, Seam[1] still defines the concept of outjection and the concept of conversation which is not yet defined in the specification.

EJB 3.1

We can not really speak about revolution; instead I would speak about completeness of the specification.

We can find new annotations such as:

@Singleton, this can be seen as strange in a world who always speaks about multi core, grid and cloud.

@Startup

@Asynchronous for asynch invocation.

The new interesting thing is that the EJB container can run on JAVA SE! Before, we used to have a JEE container for testing, today EJB can be tested locally with a simple JRE. In addition it means that SE applications can, for instance, instantiate Enterprise beans and benefit of the transactional API.

JSF 2.0

We cannot forget the new JSF API with standardized facelets, JAVASCRIPT API and AJAX support with partial views. I am really impatient to see it!

Finally the key note finished on a demo of a preview of Glassfish V3. The demo (From Eclipse) highlighted several interesting things:

  • The re-deploy with session preservation. This means that you can re-deploy your web application while preserving your current sessions and contexts.
  • The injection of a service exposed by a pure OSGI bundle into a servlet. That’s a real promising feature. The bundle jar file has just to be copied in a special directory of the AS and it can be directly injected into a servlet by “@Resource(“service name”) ServiceInterface myService”.

 

Summary

The JEE 6.0 has been designed in the aim to be modular, flexible and extensible and OSGI has a central place in theses three terms. As a result the container is becoming lighter and more efficient. The real objective is to get back all developers gone for Spring or other lighter Enterprise frameworks.

References

[1] JBoss Seam, http://jbpm.org

[2] The Glassfish project, https://glassfish.dev.java.net

[3] Apache Geronimo Roadmap, http://cwiki.apache.org/GMOxDEV/road-map-for-jee6-web-profile.html


 

Releated Posts

Privacy Enhancing Technologies 2024: A Summary

For Large Language Models (LLMs), Azure confidential computing offers TEEs to protect data integrity throughout various stages of the LLM lifecycle, including prompts, fine-tuning, and inference. This ensures that all
Read More

IEEE Big Data 2023 – A Summary

Our CTO, Sabri Skhiri, recently travelled to Sorrento for IEEE Big Data 2023. In this article, Sabri explores for you the various keynotes and talks that took place during the
Read More