Tag Archives: cdi

CDI (2.0) Async Events

Glassfish 5 builds for Java EE 8 are rolling along… here is another Docker based example on Github. This time it’s asynchronous events in CDI 2.0 (JSR 365) Steps Just follow the README… just a bunch of docker commands to get … Continue reading

Posted in Docker, Java, 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

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 , , , , , , | 5 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

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