Tag Archives: ejb

kafEEne #2: Kafka & Concurrency Utilities

Yet another blog post of the kafEEne series – this time, its Java EE Concurrency Utilities in action along with Kafka. As usual, the code is on Github and you can refer to the README on how to get this up … Continue reading

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

Consume from Kafka topics using Message Driven Beans

Thanks to the recently released Payara Kafka Connector, you can now consume messages from Kafka using Message Driven Beans! Here is a Docker based example for trying it out. Quick overview A @Singleton bean fires a producer process which run in … Continue reading

Posted in Java EE | Tagged , , , , , , | 2 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

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

JAX-RS, JWT & a pinch of JSR 375

This is another version of my previous blog on JAX-RS and JWT which includes a pinch of Java EE Security API (new JSR in Java EE 8). In case you are completely new to JSR 375, please jump to the last … Continue reading

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

Video Blog: Automated Retry In Java EE applications

The folks at Webucator have converted one of my previous blog posts (about automatically retrying operations in Java EE applications using Interceptors) into a video tutorial. Personally, I tend to stick to text only blogs due to lack of time … Continue reading

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

Implementing auto retry in Java EE applications

Initially, I wanted to call this blog – ‘Flexible timeouts with interceptor driven retry policies‘ – but then I thought it would be too ‘heavy’. This statement, along with the revised title should (hopefully) give you an idea of what … Continue reading

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

RESTful timers in Java EE

In this post…. Whirlwind tour of EJB timers Working with EJB timers on the fly via simple REST interface with a sample implementation ——————————- Update (14 July 2015) ————————- The front end for the application is now available on OpenShift. … Continue reading

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

Quick tip: Exception handling in Message Driven Beans

Let’s do a quick review of exceptional handling with regards to Message Driven Beans. The entry point into a MDB is the overridden onMessage method. It does not provide any scope for throwing checked exceptions and as a result, you … Continue reading

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