Jetty 7.0 released
The release of Jetty 7.0 was announced today and is available for download from its new home at Eclipse.org as well as via the maven repository. This version represents an evolution of Jetty 6.0, and represents a significant reorganisation of the codebase as well as numerous performance improvements.
InfoQ covered the move of Jetty to Eclipse earlier in the year; and whilst Jetty 6.0 will still be supported, new features are being targeted at 7.0. Both Jetty 6.0 and 7.0 are based on the Servlet 2.5 API; the experimental Jetty 8.0 is tracking the Servlet 3.0 API which is expected to be finalised next year.
One of the key features of Jetty 6.0 was the introduction of Continuations at the Servlet layer, which allows long-lived client connections (such as those used by CometD, also known as the Bayeux protocol). InfoQ previously covered the Jetty 6.0 release and demos of continuations show how they can be used to scale up the number of concurrent users without compromising the number of threads (and associated overhead).
The success of this technique led to Jetty's proposal of asynchronous servlets in the Servlet 3.0 draft specification. Jetty 7.0 implements these continuations in such a way that they can run unchanged on Servlet 3.0 implementations, and fall back (to non-asynchronous, blocking) in non-Jetty Servlet 2.5 implementations.
Since the move to Eclipse, the code has been refactored (the
org.mortbay prefix has been replaced with
org.eclipse), and the monolithic
server.jar has been split into its constituent bundles (
jetty-io.jar etc.). One of the side benefits of modularisation has been a more enforced separation of concerns between the different bundles, which in turn has led to a more modular approach to embedding. Whilst Jetty is now a set of valid OSGi bundles (with well-defined dependencies), it can still be run outside of an OSGi runtime.
The porting document describes the differences in the packages; since a number of class names have changed, there is an automated tool that can convert configuration files to use the new names for Jetty 7.0. Future upgrades (e.g. to Jetty 8.0) will be much more seamless, since the packages won't undergo a future rename or repackaging.
The cometd-jetty project, based on the older Jetty 6.0, has been deprecated in favour of cometd-java based on Jetty 7.0, and which now lives at CometD.org. A demo is available which shows the benefit of asynchronous continuations by providing a number of AJAX clients, which create long-lived connections to the back-end server but without increasing load.
- Glassfish's JSP
- JTA from atomikos
- Maven plugin
- Ant integration
- Spring configuration
The current version of Hightide is available to download is currently based on Jetty 6.0, but a revised version including Jetty 7.0 will be available in the near future.
Jetty is available under a dual-license including Apache License 2.0 as well as the Eclipse Public License 1.0 from www.eclipse.org/jetty. In addition, Jetty packages are also available from Codehaus for other platforms, like RPMs and Debs packages for Linux systems.
Mike Keane Dec 21, 2014
Jeremy Stieglitz Dec 21, 2014