Java EE 6 Platform Draft Published featuring the Web Profile
The public draft of the Java EE 6 Platform specification has been published and will remain open for public review and feedback until the 23rd of Feb, 2009. Maybe the most notable part of this delayed draft is the Web Profile, which is first profile in the history of the Java EE platform.
Roberto Chinnici who is the Spec Lead gives an outline of the Web Profile:
After much deliberation, the platform expert group chose to go with a mid-range version of the Web Profile, close to option B in my earlier writeup.
The required technologies are:
Debugging support for other languages (JSR-45) 1.0
EJB 3.1 Lite
You may notice that some of the version numbers don't match the latest published API (e.g. EL 1.2). That's because we plan on making minor changes to the corresponding technology via a maintenance review. I'll be providing more details as they become available.
The rationale for the Web Profile is explained in the draft:
The Web Profile is targeted at developers of modern web applications.
With the term “modern” we intend to highlight the fact that the world of web applications has made much progress since the introduction of the first Servlet specification. Inevitably, the number of technologies used to create even simple web applications had grown by leaps and bounds. In fact, few web applications today are written directly to the servlet API: most applications rely on standard or third-party frameworks and libraries, often developed as open source, which in turn use the services of the servlet container.
Besides managing HTTP interactions, most web applications have significant requirements in the areas of transaction management, security and persistence. Such requirements can be readily addressed by technologies that have been part of the Java EE platform for quite some time, such as the Enterprise JavaBeans (EJB) 3.x technology and the Java Persistence API, but that are rarely supported by “plain” servlet containers. By incorporating many of these APIs, the Web Profile aims at raising the bar for what should be considered a basic stack for the development of web applications using the Java platform.
Targeting “modern” web applications then implies offering a reasonably complete stack, composed of standard APIs, and capable out-of-the-box of addressing the needs of a large class of web applications. Furthermore, this stack should be easy to grow, so as to address any remaining developer needs.
Against this drive towards completeness, one wishes to balance a desire to limit the footprint of web containers, both in physical and in conceptual terms. From the point of view of developers learning the Web Profile, it is more valuable to have a small, focused profile, with as little overlap between technologies as possible, rather than a more powerful but overly complex one, with redundant APIs.
In defining the Web Profile we strove to find a middle ground between these two sets of requirements.
In terms of completeness, the Web Profile offers a complete stack, with technologies addressing presentation and state management (JavaServer Faces, JavaServer Pages), core web container funtionality (Servlet), business logic (Enterprise JavaBeans Lite), transactions (Java Transaction API), persistence (Java Persistence API) and more.
As for simplicity, it leaves out many of the enterprise backend APIs that are part of the Java EE platform. It also relies on the new pluggability features in the Servlet specification (see e.g. Section 8.2 of that document) to allow applications to use libraries that extend the servlet container with minimal configuration overhead. For example, a standard technology such as the Java API for Restful Web Services (JAX-RS), which is part of the full Java EE platform but not of the Web Profile, can be “plugged” into a web container without requiring any changes to an application’s web.xml descriptor.
Finally, it is worth reminding that Web Profile products are allowed to ship with more technologies than the required ones. It is conceivable that products will offer a choice at installation time between different configurations, some richer in extensions, or even allow for complete customization beyond the required core (“a la carte” installation).
Roberto also explains that JAX-RS is not a required component of the Web Profile because the expert group feels that it is too early to mandate its inclusion.
Something else missing is Web Beans which is not listed as a required component either in the Web Profile or the full platform:
Web Beans is not listed as a required component either in the Web Profile or the full platform. On the other hand, it is mentioned in section EE.6.29 as a component under consideration for inclusion. The expert group would like to solicit feedback from the community on this subject.
Observant readers will also have noticed that the Web Beans specification, currently in public draft, was extensively updated just yesterday. Gavin King's blog has all the details of the changes, which were triggered by feedback mostly coming from the JSR-316 expert group. Among the biggest changes, the term "Web Beans" itself has disappeared from the spec. While this may come as a shock to some, it's really a positive development, since it signifies the merging of the functionality that Web Beans provided with the established Java EE concepts of "containers" and "components". I believe that the end result is a more usable, better integrated, easier to learn "Web Beans", now providing contextual support and dependency injection for the whole Java EE platform.
Bean Validation is also not listed as a Java EE 6 component JSR:
Even more observant readers will have noticed that JSR-303 is in public review, yet it is not listed as a Java EE 6 component JSR. This is simply a matter of timing; the platform expert group just started discussing the inclusion of JSR-303, so no decision had been reached at the time the public draft of the platform specification was sent to the (virtual) presses. I should point out that the JSR-303 expert group, lead by Emmanuel Bernard, has done a lot of work to address the needs of JPA and JSF in the area of validation, so I'm confident that JSR-303 will be well received by the community.
The draft is available for download and contains both the Java EE 6 Spec and the Web Profile Spec.
There is a poll running at java.net regarding what the community thinks about the new spec. Although participation is yet rather small the results tend to show that the released draft did not cause any excitement:
I like it 12.1%
I think the main spec is missing important JSRs 3%
I think the web profile spec is missing important JSRs 6%
I don't like it for some other reason 6%
I haven't read it, but plan to 9%
I haven't read it, and don't plan to 63.6%
You can find more information on Enterprise Java right here on InfoQ.
Leaving out JAX-RS from the Web profile is criminally insane
For more information on why JAX-RS is the greatest thing to come to Java EE since, I don't know, some time, see James Stachan's blog entries: JAX-RS as the one Java web framework to rule them all? or JAX-RS as the basis of a DRY web framework.
And of course, our own awesome Web framework (migrated to leverage JAX-RS this summer): Nuxeo WebEngine :) (Shameless plug, sorry ;) ).
S. Fermigier, founder and chairman, Nuxeo
Daniel Bryant, Arian Adair, Michael Hendricks Jul 31, 2015
A. Falck, M. Rezaei, E. Pederson, B. Brodie Jul 31, 2015