Jetty WebSocket Client API updated

With the release of Jetty 7.5.0 and the latest draft 13 of the WebSocket protocol, the API for the client has be re-factored a little since my last blog on WebSocket: Server, Client and Load Test. WebSocketClientFactory When creating many instances of the java WebSocketClient, there is much that can be shared between multiple instances: buffer pools, thread pools and … Continue reading

Posted in Jetty | 24 Comments

GWT and JNDI

Many folks want to use some features beyond the bare servlet basics with GWT, such as JNDI lookups. It’s not hard to set up, but there are a couple of steps to it so here’s a detailed guide. Since GWT switched to using Jetty for its hosted mode (also known as development mode) back at GWT 1.6, lots of people … Continue reading

Posted in GWT, Jetty | 11 Comments

Sifting Logs in Jetty with Logback

Ever wanted to create log files at the server level that are named based on some sort of arbitrary context?It is possible to do with Slf4j + Logback + Jetty Webapp Logging in the mix. Example projects for this can be found at github https://github.com/jetty-project/jetty-and-logback-example Modules: /jetty-distro-with-logback-basic/ This configures the jetty distribution with logback enabled at the server level with  … Continue reading

Posted in Jetty, Servlets | 3 Comments

NoSql Sessions with Jetty7 and Jetty8

When Jetty 7.5.0 is released we will have officially started to dabble in the area of distributed session handling and storage. To start this out we have created a set of abstract classes around the general concept of NoSQL support, and have prepared an initial implementation using MongoDB. We will also be working on Ehcache and perhaps Cassandra implementations over … Continue reading

Posted in General, HTTP, Jetty, Servlets | Tagged , , | 5 Comments

Websocket Example: Server, Client and LoadTest

The websocket protocol specification is approaching final and the Jetty implementation and API have been tracking the draft and is ready when the spec and browsers are available.   More over, Jetty release 7.5.0 now includes a capable websocket java client that can be used for non browser applications or load testing. It is fully asynchronous and can create thousands … Continue reading

Posted in Ajax Comet, General, HTTP, Java, Jetty, Servlets, WebSockets | Tagged , , , , | 14 Comments

Prelim Cometd WebSocket Benchmarks

I have done some very rough preliminary benchmarks on the latest cometd-2.4.0-SNAPSHOT with the latest Jetty-7.5.0-SNAPSHOT and the results are rather impressive.  The features that these two releases have added are: Optimised Jetty NIO with latest JVMs and JITs considered. Latest websocket draft implemented and optimised. Websocket client implemented. Jackson JSON parser/generator used for cometd Websocket cometd transport for the … Continue reading

Posted in Ajax Comet, cometd, HTTP, Java, Jetty, Servlets, WebSockets | Tagged , , | 4 Comments

CometD JSON library pluggability

It all started when my colleague Joakim showed me the results of some JSON libraries benchmarks he was doing, which showed Jackson to be the clear winner among many libraries. So I decided that for the upcoming CometD 2.4.0 release it would have been good to make CometD independent of the JSON library used, so that Jackson or other libraries … Continue reading

Posted in cometd, Jetty | Tagged , , , , | 2 Comments

Jetty JMX Webservice

Jetty JMX Webservice is a webapp providing a RESTful API to query JMX mbeans and invoke mbean operations without the hassle that comes with RMI. No more arguments with your firewall admin, just a single http port. That alone might not be a killer feature, but Jetty JMX Webservice also aggregates multiple mbeans having the same ObjectName in the same … Continue reading

Posted in Jetty | 12 Comments

Jetty Overlayed WebApp Deployer

The Jetty Overlay Deployer allows multiple WAR files to be overlayed so that a web application can be customised, configured and deployed without the need to unpack, modify and repack the WAR file. This has the benefits of: The WAR file may be kept immutable, even signed, so that it is clear which version has been deployed. All modifications made … Continue reading

Posted in Jetty | 9 Comments

CometD Message Flow Control with Listeners

In the last blog entry I talked about message flow control using CometD‘s lazy channels. Now I want to show how it is possible to achieve a similar flow control using specialized listeners that allow to manipulate the ServerSession message queue. The ServerSession message queue is a data structure that is accessed concurrently when messages are published and delivered to … Continue reading

Posted in cometd | Tagged | 1 Comment