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.

Where to use EJB 3.1 and CDI?

I am making a Java EE based product in which I'm using GlassFish 3 and EJB 3.1. My application has session beans, …

ejb-3.0 glassfish-3 cdi apache-tomee
CDI: beans.xml, where do I put you?

I am using Weld as CDI implementation. My integration test, that tries to assemble object graph instantiating Weld container works …

java jakarta-ee maven cdi jboss-weld
Unsatisfied dependencies for type [...] with qualifiers [@Default] at injection point (using @Stateful EJB with CDI)

I have the following code to manage two kinds of repositories. Both repository classes inherit an interface to allow reinitialization …

java ejb-3.0 java-ee-6 cdi seam3
How do CDI and EJB compare? interact?

I'm having a tough time understanding how the two interact and where the boundary between them lies. Do they overlap? …

java ejb java-ee-6 cdi
CDI Ambiguous dependencies

I have a @SessionScoped @Named bean with a @Producer method for a user object: @Named @SessionScoped public class UserBean implements …

java cdi jboss-weld
Java EE 6 @javax.annotation.ManagedBean vs. @javax.inject.Named vs. @javax.faces.ManagedBean

I feel there is a little mess in the Java EE 6 spec. There are several sets of annotations. We have …

java jakarta-ee java-ee-6 cdi
CDI injection is not working in Servlets

I really need your help. I'm working on this problem for weeks or months now. I apologize for the long …

jakarta-ee servlets jetty cdi jboss-weld
Inject and Resource and Autowired annotations

What's the difference between @Inject and @Resource and @Autowired annotations? When should we use each of them?

spring dependency-injection annotations cdi autowired
Unsatisfied dependencies for type X with qualifiers @Default

I'm trying to inject an object of a given type (Greeter) on an EJB running inside Wildfly 8.2. However, the deployment …

jakarta-ee cdi code-injection
How to use CDI for method parameter injection?

Is it possible to use CDI to inject parameters into method calls? The expected behaviour would be similar to field …

java dependency-injection cdi jboss-weld