24 September 2012

ServerSent-Events on WebLogic Server

In addition to the WebSocket support we've added into the next major release of WebLogic Server (version 12.1.2  with all usual caveats with respect to release timeframes, no guarantee, etc.) we've also added support for the HTML5 ServerSent-Event model through collaborating with the GlassFish team and integrating the GlassFish ServerSent-Event feature.

The HTML5 ServerSent-Event model provides a mechanism to allow browser clients to establish a uni-directional communication path to a server, where the server is then able to push messages to the browser at any point in time. 

A common JavaScript API (EventSource) is provided in modern browsers that allows the client to establish connections to the server and register callback functions to handle events as they come in over the connection, which can then be used to make any necessary page updates.

Some good sources of information on ServerSent-Events/EventSources are:
This new feature in WebLogic Server and GlassFish provides a small Java API and a couple of annotations that developers use to create and publish ServerSent-Event handlers, from which applications on the server can use to send messages to connected browser clients at any time, essentially enabling applications to push messages to clients over standard HTTP(S).

The runtime component of the feature uses CDI to instantiate and manage the handlers and support the injection of them into other application components as well as setting up and managing the asynchronous connection for each client.

Jitu from the GlassFish team provided some information on the feature earlier in the year:
Bhakti also from the GlassFish team has a posting with an example of a SSE application that fetches data from a twitter feed and republishes to clients:
Here it is running on a development build of WebLogic Server 12.1.2.

Besides being an interesting new feature with lots of possibilities, this also serves to demonstrate how the WebLogic and GlassFish teams are cooperating and producing innovative outcomes.

1 comment:

Olfa said...


I was able to test the ServerSent events on GlassFish 4 (beta version), but can't find the Weblogic development build. Do you have an idea about weblogic 12.1.2 release date ?