InfoQ

News

Sun Submits Servlet 3.0 Specification to JCP

Posted by Xandy Johnson on Jun 21, 2007 06:45 PM

Community
Java
Topics
JCP Standards

Sun has submitted the Servlet 3.0 specification to the Java Community Process (JCP) as Java Specification Request (JSR) 315. High level goals include web framework pluggability, EoD (ease of development) features, async and Comet support, security, alignment with other specifications, and various other improvements. It is targeted for inclusion in Java EE 6 with a rough schedule putting final release in Q4 2008. Comments are due by July 2, 2007.

Here's an expanded version of the goals, from the JSR 315 Proposal:

  • Web framework pluggability.
    • Almost all of the Java based web frameworks build on top of servlets. Most web frameworks today plugin either through servlets or through web.xml. Annotations to define some of the servlets, listeners, filters will help in making this possible. Programatic access to web.xml and dynamic changes to configuration of a webapp are desired features. This JSR will aim to provide the ability to seamlessly plugin different web frameworks into web appplications.
  • EOD
    • Annotations - use of annotations for the declarative style of programming.
    • As part of the EoD effort the goal is to have zero configuration for web applications. The deployment descriptors would be used to override configuration.
    • Generics - Use generics in the API where possible.
    • Use of other language enhancements where possible to improve the usability of the API.
  • Async and Comet support
    • Non-blocking input - The ability to receive data from a client without blocking if the data is slow arriving.
    • Non-blocking output - The ability to send data to a client without blocking if the client or network is slow.
    • Delay request handling - The comet style of Ajax web application can require that a request handling is delayed until either a timeout or an event has occurred. Delaying request handling is also useful if a remote/slow resource must be obtained before servicing the request or if access to a specific resource needs to be throttled to prevent too many simultaneous accesses.
    • Delay response close - The comet style of Ajax web application can require that a response is held open to allow additional data to be sent when asynchronous events occur.
    • Blocking - Non-blocking notification - The ability to notify push blocking or non-blocking events. Channels concept - The ability to subscribe to a channel and get asyncronous events from that channel. This implies being able to create, subscribe, unsubscribe and also apply some security restriction on who can join and who cannot.
  • Security
    • Ability to login / logout.
    • Self registration.
  • Alignment
    • Alignment / requirements from REST JSR (JSR 311).
    • Alignment / requirements from JSF 2.0 JSR [(JSR 314)].
  • Misc
    • Better welcome file support.
    • ServletContextListener ordering.
    • Container wide definition for init params.
    • File upload - progress listener - where to store interim and final file.
    • Clarifications of thread-safety issues.

Greg Wilkins, the main developer of Jetty and a supporting member of this JSR, takes issue with several of the goals under the "Async and Comet support" area. For both non-blocking input and output, he argues that the capabilities should be added to the container rather than exposed to the servlet developer. For delay request handling, he argues that suspend/resume semantics would be better and that they would also address the need for delay response close.

Existing projects will be used as a guide for the specification when appropriate. For example containers with current Comet support such as Grizzly, Tomcat, and Jetty will be reviewed when defining APIs for Comet. "Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. It allows creation of event-driven web applications which are hosted in the browser." Also some existing web frameworks such as Shale, DWR, Spring Web Flow, and Wicket will be analyzed for web framework pluggability.

1 comment

Reply

RE: Use of other language enhancements where possible by Joe Wolf Posted Jun 22, 2007 7:57 AM
  1. It'd be cool if they replaced occurances of Enumeration with Iterator in the API.

Exclusive Content

Rob Windsor on WCF with REST, JSON and RSS

WCF is not just for SOAP based services and can be used with popular protocols like RSS, REST and JSON. Join Rob Windsor as he introduces WCF 3.5 and its new native support for non-SOAP services.

Christophe Coenraets Discusses Flex 3, AIR, and BlazeDS

Christophe Coenraets discusses Flex 3, Flex Builder, AIR, BlazeDS, Adobe and open source, integrating Flex with existing applications, and integrating RIAs with search engines and browsers.

Debunking Common Refactoring Misconceptions

Danijel Arsenovski attempts to dispel some of the myths around refactoring and how it applies to .NET developers.

REST Eye for the SOA Guy

In this presentation, recorded at QCon San Francisco, CORBA guru Steve Vinoski explains REST from the view of someone who comes to SOA from a traditional, RPC-oriented background.

Choose Feature Teams over Component Teams for Agility

Feature teams are key to scaling agility for large teams. In an excerpt from "Scaling Lean and Agile Development," Larman & Vodde show how feature teams resolve traditional problems & raise new issues

Billy Newport explains Virtualization

Billy Newport talks about virtualization, eXtreme Transaction Processing (XTP) and WebSphere Virtual Enterprise. He discusses hardware, hypervisor, JVM, application and data virtualization.

Virtualization and Security

While virtualization provides many benefits, security can not be a forgotten concept in its application.

Introduction to Agile for Traditional Project Managers

This session is specifically aimed at traditionally trained project managers who are new to Agile, and who would like to be able to relate the PMI's best practices to their Agile equivalents.