1 package ejava.examples.ejbwar.inventory.ejb;
2
3 import javax.enterprise.inject.Produces;
4
5 import javax.persistence.EntityManager;
6 import javax.persistence.PersistenceContext;
7
8 import ejava.examples.ejbwar.inventory.cdi.Inventory;
9
10 /**
11 * This class is used to provide resources required by the application.
12 * We must have a Web-INF/beans.xml file in place in the WAR to enable CDI.
13 */
14 public class InventoryConfig {
15 @Produces @Inventory
16 @PersistenceContext(unitName="webejb-inventory")
17 public EntityManager inventoryEM;
18 }