Posts tagged event
WebLogic 12c (12.1.2) has support for WebSockets. ADF 12c runs on WebLogic 12c. Therefore, we should be able to leverage that WebSockets support in an ADF application. And indeed we can, as this article describes. It will explain the creation of a simple application – the SlidePresenter – that allows users to select an image from a carousel. As soon as they make the selection, all currently connected clients are synchronized, showing the same slide:
The application uses a WebSocket endpoint – an object that acts as the server end for web socket connections. Each browser session connects to the end point and starts a new websocket connection. Whenever a slide is selected, the WebSocket endpoint is informed (on the server side) and broadcasts the slide selection to all connected clients. A brief demo of what this looks like is shown here:Pushy in Sockets – demo
The application also support an automatic slideshow: one user starts the slideshow by pushing a button. This causes a scheduled future to be instantiated in the server that fires every 3 seconds to advance the slideshow. After two minutes, the show will finish.
The application can be downloaded under Resources. It runs More >
In this article, I show how I have created a simple and fairly meaningless Java EE 7 application that uses a number of smart Java EE features:
- a stateless session bean has a scheduled method (that is triggered every 3 seconds)
- the stateless session bean publishes custom CDI events
- a class annotated as WebSocket EndPoint manages WebSocket channels with WS clients (in this case simple HTML browser applications) – echoing messages between the clients
- the WebSocket Endpoint also observes the CDI event and pushes the event payload to each of the WebSocket clients
Using NetBeans 7.3.1 and GlassFish 4.0 – as well as a number of blog-articles and sample applications – this turned out to be very simple to put together.
This next figure visualizes what I did:
The important steps to come to a running applications are:
- create new Java EE 7 project in NetBeans
- create class TimeEvent that will be used to publish as CDI event
- create class EventProducer – a stateless EJB session bean that is scheduled to trigger every 3 seconds; it publishes a TimeEvent whenever it is triggered
- create class SocketMediator – an annotated POJO that has the ServerEndpoint annotation (to More >
On the Oracle Technology Network, architecture section, my article titled “Fanning Out Events on the Oracle SOA Suite 11g Event Delivery Network” has just gone live:
This article describes:
how events can be used in Oracle SOA Suite 11g to have business processes impact each other in a meaningful way with maximum decoupling. Specifically, this article describes a solution for fanning out Event Delivery Network (EDN) events to a more fine-grained level. This allows a single event to influence multiple running instances of a Business Process Execution Language (BPEL) process. The article uses the following Oracle SOA Suite 11g components: BPEL , Mediator ,Event Delivery Network, Spring , Locator API , Composite Sensors
Sporting a selection of the world’s best known speakers in the area of Oracle Forms and Forms modernization – on Tuesday 15th May AMIS will host an all day event around Forms, aimed at application architects and lead developers. During this event, we will discuss and demonstrate the most relevant options for moving Forms applications (and Forms developers) to the future. Registration for this event is free – the capacity is limited. See this link for the full program, the abstracts for all the presentations and the biographies of the speakers: http://www.amis.nl/theme/amis/uploadedFiles/PDF/Future%20of%20Forms%20EN%20DAG.pdf.
First steps with jWebSocket – open source Java framework for WebSockets – installation and running samples6
This month, In have been delving into Push architectures for the Web, looking into WebSockets among several other things. WebSockets, a fairly new standard (!) evolved along with HTML 5, specifies a communication protocol that provides an alternative to classic HTTP communication. WebSocket based interaction has lower overhead and – more importantly – is bi-directional which means that push from server to client is really supported (and not just emulated through poll, long poll or streaming responses as is currently the case in comet push style frameworks).
The WebSocket server side is at this moment not very well defined. Other than the fact that the communication over ws:// and wss:// should be handled by a server, not much has been decided about the server side of WebSockets. Currently, WebSockets is not supported in More >