Top "Cdi" questions

Contexts and Dependency Injection (CDI): Java Platform, Enterprise Edition (Java EE) 5 brought dependency injection (DI) with Convention over Configuration to Enterprise JavaBeans (EJB) 3.0. Java EE 6 introduces the flexible and powerful @Inject dependency injection model (JSR-330 and JSR-299) in addition to the already existing @EJB annotation.

Differences between Java EE 6 CDI Implementations

I've looked at JBoss' Weld Reference Implementation of JSR-299 Contexts and Dependency Injection, and I wanted to know how others …

jakarta-ee java-ee-6 resin cdi jboss-weld
When is a @Dependent scoped CDI bean destroyed, if you obtain that bean via Provider.get()?

I am struggling to understand the effective lifecycle of a @Dependent scoped bean in both CDI 1.0 and CDI 1.1. My experiments …

jakarta-ee cdi jboss-weld weld
Which is the Spring equivalent for the CDI @Produces annotation?

When I was working with CDI, I could use the @Produces annotation to create a producer method to be called …

java spring dependency-injection cdi
What is the easiest way to have CDI and JPA in Java SE?

I would like to have in Java SE @Stateless public class CarDAO { @Inject private EntityManager em; public Car findById(Long …

java jpa cdi entitymanager
Richfaces 4 a4j:commandLink action not firing in rich:popupPanel

I seem to be having a problem where I have an a4j:commandLink on a rich:popupPanel but the …

jsf-2 richfaces cdi jboss-weld commandlink
WELD-001408 Unsatisfied dependencies

I have a very famous error, but I can't solve it. I'm trying to run arqullian test for my application. …

jboss ejb jboss7.x cdi jboss-arquillian
How can I inject in @FacesConverter?

I wrote a converter. I am using CDI and injection parallel. In that case the classes are not injected. How …

jsf jakarta-ee dependency-injection cdi
How do I get a SessionScoped CDI bean from inside a Filter?

This question is related to a previous one on writing a session timeout handler. The answer in that thread involved …

jsf-2 servlet-filters cdi
GlassFish, CDI and constructor injection

Is constructor injection supported in GlassFish 3.1's implementation of CDI for managed beans? I have a @Singleton EJB into which …

dependency-injection glassfish java-ee-6 cdi constructor-injection
Java CDI @PersistenceContext and thread safety

Is an EntityManager @Inject[ed] as follows in muliple classes threadsafe? @PersistenceContext(unitName="blah") private EntityManager em; This question and …

java java-ee-6 cdi