List/Grid Tag Archives: CDI

Asynchronous CDI Events
Few days ago, during our regular code review, one of my colleagues raised a question what would happen — and if it’s even possible — when a CDI Observer (so a method with parameter ...

Java EE CDI Disposer methods example
In this tutorial you will learn how to use CDI Disposer methods in order to perform clean up of resources created by CDI Producer methods. 1. Introduction CDI Producer methods may ...

Java EE CDI Producer methods tutorial
In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes ...

Java EE CDI ConversationScoped example
1. Introduction As we have seen previously on Java EE CDI bean scopes CDI provides a set of available built-in bean scopes. One of these scopes is the Conversation scope. In this tutorial ...

Java EE CDI bean scopes
1. Introduction When a managed bean is initialized by CDI the bean will be initialized in a very specific scope. The scope in which the bean is initialized will determine its lifecycle. ...

JSF – Eager CDI beans
Everybody knows eager managed beans in JSF 2. @ManagedBean has an eager attribute. If eager=’true’ and the scope is application, then this bean must be created when the ...

Custom error pages for expired conversations involving CDI and JSF
It’s been a while since I last blogged. I keep thinking of blogging something technical but end up getting busy with other things. This last week there was a very interesting ...

Configure timeout for CDI conversations
CDI conversation scope is a nice feature when developing JSF applications. Imagine you have large data tables which take a long time to be loaded. You normally don’t want to place ...

Integration testing scoped beans in CDI 1.0 and Spring 3.1
In this blog post I describe how to do integration testing with scoped beans in Spring and CDI. Everything is illustrated with small code samples. Integration testing with scopes is ...

Simulating CDI’s Session and Request Scope in a J2SE app
We’re currently considering refactoring the Naked Objects framework to use JSR-330 (dependency injection) and EE-oriented big brother, JSR-299 (CDI). Using vanilla JSR-330 is a no-brainer, ...

