O'Reilly logo

Java EE 7 Development with WildFly by Francesco Marchioni, Michal Matloka, Michal Cmil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Expanding our client application

It's time to show how you can leverage the WebSocket features in real life. In the previous chapter, Chapter 7, Adding Web Services to Your Applications, we created the ticket booking application based on the REST API and AngularJS framework. It was clearly missing one important feature: the application did not show information concerning ticket purchases of other users. This is a perfect use case for WebSockets!

Since we're just adding a feature to our previous app, we will only describe the changes we will introduce to it.

In this example, we would like to be able to inform all current users about other purchases. This means that we have to store information about active sessions. Let's start with the registry ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required