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