Tag Archives: ejb

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

Timeout policies for EJBs : how do they help…?

EJB 3.1 introduced timeout related annotations as a part of its API. @AccessTimeout @StatefulTimeout Let’s quickly look at what they are and why are they important @AccessTimeout Specifies the time period after which a queued request (waiting for another thread … Continue reading

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

Valid CDI scopes for Session (EJB) beans

CDI enriches the EJB specification (Session beans to be specific) by providing contextual life cycle management. Session beans are not ‘contextual’ instances in general. If you are comfortable with CDI in general, the idea of ‘being contextual’ should be pretty … Continue reading

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