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.

@ApplicationScoped CDI bean and @PersistenceContext - is this safe?

Is it safe to do something like this with CDI? @Named @ApplicationScoped public class DAO { @PersistenceContext private EntityManager entityManager; } I …

jakarta-ee jpa java-ee-6 cdi
Getting a GET request param into an @ViewScoped bean

I have a (request-scoped) list from which the user may select a "PQ" (list of links). When clicked or otherwise …

java jsf-2 javabeans cdi scopes
Java EE 6: Switching to CDI - Best resources

I have a small yet complete Java EE 6 application at hand. The traditional annotations are being used: @Resource, @EJB, @Singleton, @…

dependency-injection jakarta-ee java-ee-6 cdi
CDI Injection of an EJB leads to NullPointerException

I am new to Java EE 6 and CDI. I have read a couple of tutorials and the weld documentation. However …

java java-ee-6 glassfish-3 cdi ejb-3.1
Configuration to be able to @Inject EntityManager in Seam 3

In my project I use Seam 3 and I am having issues injecting the EntityManager with the @Inject annotation. I am …

java configuration persistence cdi seam3
PreRenderView incrementally called on every postback

I have an issue with the order and number of executions of an f:event type="preRenderView". During my search …

jsf-2 cdi prerenderview
Transaction management and CDI

I would like to develop an application with CDI (I use Spring usually) to discover this technology. I have read …

jakarta-ee cdi ejb-3.1
What is the alternative to OSGI for inter-module service injection in Wildfly?

We are in the process of disentangling a classic legacy monolithic EAR-packaged Java EE application. Our (most complex) component wiring …

dependency-injection osgi cdi weld wildfly
@Inject to pass params to a CDI @Named bean via URL

If I cannot use the @ManagedProperty annotation with @Named, because @ManagedProperty doesn't work in CDI(?), then how do you pass …

jsf facelets cdi managed-property
Java EE 6 : @Inject and Instance<T>

I have a question about the @Inject annotation in java ee 6 : What is the difference between : @Inject private TestBean test; @…

dependency-injection ejb javabeans java-ee-6 cdi