1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.persistenceunitref; 26 27 import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkEntityManagerFactory; 28 29 import javax.annotation.Resource; 30 import javax.ejb.Remote ; 31 import javax.ejb.SessionContext ; 32 import javax.ejb.Stateless ; 33 import javax.persistence.EntityManagerFactory; 34 import javax.persistence.PersistenceUnit; 35 36 import org.objectweb.easybeans.tests.common.ejbs.base.ItfCheck00; 37 38 43 @Stateless (name = "SLSBPUnitRefFieldInjection00") 44 @Remote (ItfCheck00.class) 45 public class SLSBPUnitRefFieldInjection00 implements ItfCheck00 { 46 47 50 @Resource 51 private SessionContext sessionContext; 52 53 56 @PersistenceUnit(name = "persistence/pu00") 57 private EntityManagerFactory emf00; 58 59 62 @PersistenceUnit(name = "persistence/pu01", unitName = "testEntity00") 63 private EntityManagerFactory emf01; 64 65 68 @PersistenceUnit(unitName = "testEntity00") 69 private EntityManagerFactory emf02; 70 71 78 public void check() { 79 checkEntityManagerFactory(sessionContext, emf00, "persistence/pu00"); 80 checkEntityManagerFactory(sessionContext, emf01, "persistence/pu01"); 81 checkEntityManagerFactory(sessionContext, emf02, 82 "org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged." 83 + "persistenceunitref.SLSBPUnitRefFieldInjection00/emf02"); 84 } 85 86 } 87 | Popular Tags |