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.PersistenceUnit; 34 import javax.persistence.PersistenceUnits; 35 36 import org.objectweb.easybeans.tests.common.ejbs.base.ItfCheck00; 37 38 39 44 @Stateless (name = "SLSBPUnitRefDeclaration00") 45 @Remote (ItfCheck00.class) 46 @PersistenceUnits({ 47 @PersistenceUnit(name="persistence/pu00"), 48 @PersistenceUnit(name = "persistence/pu01", unitName = "testEntity00")}) 49 @PersistenceUnit(name="persistence/pu02") 50 public class SLSBPUnitRefDeclaration00 implements ItfCheck00{ 51 52 55 @Resource 56 private SessionContext sessionContext; 57 58 59 66 public void check() { 67 checkEntityManagerFactory(sessionContext, "persistence/pu00"); 68 checkEntityManagerFactory(sessionContext, "persistence/pu01"); 69 checkEntityManagerFactory(sessionContext, "persistence/pu02"); 70 } 71 } 72 | Popular Tags |