Category Archives: Java

kafEEne #1: Websocket & Kafka

Say hello  to kafEEne ! A blog series which will show Kafka and Java EE examples This one is about Kafka + (Java EE) Websocket API. Code is on Github and you can refer to the README on how to get this … Continue reading

Posted in Java EE | Tagged , , , , , , , | Leave a comment

Redis CDI example….

Here is an example of a CDI producer for Redis using the Jedis (Java) client for Redis. Check out the project README to get this up and running…. Below is a quick summary Use of CDI Qualifier Two types of … Continue reading

Posted in Java EE, NoSQL | Tagged , , , | Leave a comment

Handling ‘state’ in Java WebSocket applications

By and large, there are two kinds of states in a WebSocket application User/client specific: related to a connected user/Session e.g. user ID, list of subscriptions, last message received etc. Global: state which is relevant across your application and something … Continue reading

Posted in Java, Java EE | Tagged , , | 1 Comment

Using CDI with Java EE Concurrency Utilities

This blog post explores usage of CDI along with Java EE Concurrency Utilities – specifically using CDI beans as managed tasks. Here is the sample application on Github Lets begin with a quick overview Java EE Concurrency Utilities provides APIs … Continue reading

Posted in Java, Java EE | Tagged , , , , , , | 4 Comments

Trending Meetup groups with Redis and Java EE

This is an application which displays the currently trending Meetup groups based on their (live) RSVPs feed. It’s built using Java EE 7 (uses WebSocket client & server APIs, Singleton EJB timers and CDI events to wire things up) and … Continue reading

Posted in Java, Java EE | Tagged , , , , , , , | Leave a comment

Github: WebSocket applications…

I recently pushed a couple of WebSocket samples to Github. Both are based around the notion of a chat service – a canonical WebSocket example! These were originally meant to serve as additional material to the Java WebSocket API Handbook in order … Continue reading

Posted in Java EE | Tagged , , , | Leave a comment

Quick tip: managing Stateful EJBs in WebSocket endpoints

@Stateful EJBs can be injected in WebSocket endpoints (supported by the WebSocket specification). There is an one-to-one association between the WebSocket client & endpoint (which is by default) as well as the injected Stateful EJB instance, which makes it an good candidate for storing … Continue reading

Posted in Java, Java EE | Tagged , , , , , , | Leave a comment

WebSocket endpoint as Singleton EJB

By default … … a WebSocket implementation creates a new (server) endpoint instance per client. In case you need a single instance, you can implement this using a custom ServerEndpointConfig.Configurator (by overriding the getEndpointInstance method) The catch: you might have to sacrifice some … Continue reading

Posted in Java, Java EE | Tagged , , , , | 3 Comments

New release: Java WebSocket API handbook

Happy to announce the initial release of the Java WebSocket API handbook. This is still a work in progress but moving at a strady pace. You can read this on Gitbook or grab your PDF/ePub/Mobi version from Leanpub   Here is … Continue reading

Posted in Java, Java EE | Tagged , , , , , | Leave a comment

Microservices messaging on Oracle Cloud using Apache Kafka

Here is a blog I posted on the Oracle Cloud Developer Solutions portal. This is the first of a two-part series which shows asynchronous messaging b/w microservices with the help of a simple example (application)   Technical components Oracle Cloud Oracle … Continue reading

Posted in Cloud, Java, Oracle Application Container Cloud, Oracle Cloud, Oracle PaaS | Tagged , , , , , , , , | Leave a comment