Implementing a WebSockets transport for server-side push
In this recipe, we will install and use a custom transport. We do not actually write a custom transport because it would take way too many pages to describe the implementation from scratch. But we have implemented a fully functional WebSocket transport and provide it with this book.
Our WebSocket transport implementation is derived from the socket transport example that comes with the OSB installation. It is located in MW_HOME\Oracle_OSB1\samples\servicebus
.
If you are keen on implementing your own custom transport, you may want to look at the source code as a starting place and adapt it according to your own requirements.
How does our custom WebSockets transport basically work? The transport communicates with a local WebSocket servlet, which in turn is accessed by a WebSocket-capable browser. Since the WebLogic server does not support WebSocket servlets yet, the transport starts an embedded Jetty server which runs the WebSocket servlet...