Package ejava.examples.cdiconfig
Class CdiDemoConfig
- java.lang.Object
-
- ejava.examples.cdiconfig.CdiDemoConfig
-
public class CdiDemoConfig extends Object
This class implements a set of CDI producer fields and methods that are used to inject resources into beans within the application.
-
-
Field Summary
Fields Modifier and Type Field Description DataSource
ds
Performs a JNDI lookup and makes available as an injectable beanEntityManager
em
Gets a persistence context based on the persistence unit name and produces it for any bean injecting an EntityManager qualified with a @CdiDemo.String
message
A String for any bean injecting a String qualified by @CdiDemo annotation.
-
Constructor Summary
Constructors Constructor Description CdiDemoConfig()
-
-
-
Field Detail
-
em
@Produces public EntityManager em
Gets a persistence context based on the persistence unit name and produces it for any bean injecting an EntityManager qualified with a @CdiDemo.
-
ds
@Produces public DataSource ds
Performs a JNDI lookup and makes available as an injectable bean
-
-
Method Detail
-
jobsDao
@Produces public JobsDao jobsDao(EntityManager em)
-
-