Tag Archives: cdi

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

WebSocket and CDI integration.. again..

In one of my older blog posts, I had written about what does not work as far as WebSocket and CDI integration within the Java EE Platform 😉 This one talks about what’s possible with CDI in terms of Dependency Injection Interceptors … Continue reading

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

CDI freebies a.k.a built-in beans

Generally speaking, The CDI programming model has pre-requisite requirements for beans which are lucky enough to leverage its services (DI, contextual state management etc.). This ranges from typical Java EE Managed Beans, EJB (session) beans etc. (I’ll leave the details … Continue reading

Posted in Java EE | Tagged , , | 2 Comments

Dynamic event qualifiers in CDI

CDI Events CDI events allow your application components to communicate with each other in a loosely coupled manner. Those more familiar with JMS can also think of CDI events as a Synchronous equivalent of JMS (with Java EE 8, CDI … Continue reading

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

Native CDI Qualifiers: @Any and @Default

Let’s take a look at the out-of-the-box qualifiers in CDI There are three qualifiers declared by the CDI specification – @Any, @Default, @New @Any: Think of it as an omnipresent qualifier. It’s there even if its not 😉 @Default: As … Continue reading

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

Simplifying JAX-RS caching with CDI

This post explains (via a simple example) how you can use CDI Producers to make it a little easier to leverage cache control semantics in your RESTful services The Cache-Control header was added in HTTP 1.1 as a much needed … Continue reading

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

Integrating CDI and WebSockets

Thought of experimenting with a simple Java EE 7 prototype application involving JAX-RS (REST), WebSockets and CDI. Note: Don’t want this to be a spoiler – but this post mainly talks about an issue which I faced while trying to … Continue reading

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

Java EE Interceptors

History I think it’s important to take a look at the evolution of Interceptors in Java EE because of the simple fact that it started as an EJB-specific item and later evolved into a separate spec which is now open … Continue reading

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

What’s up with Java EE 8 ? (part 2)

Work on Java EE 8 is still in the initial phases and expected to catch pace in the upcoming year wherein we would see completion of Expert Group formation, more discussions around use cases/features, lots of JIRAs, and draft versions … Continue reading

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