1 21 package oracle.toplink.essentials.internal.ejb.cmp3.naming; 23 24 import java.util.Hashtable ; 25 import javax.persistence.EntityManagerFactory; 26 27 public class InitialContextImpl 28 extends oracle.toplink.essentials.internal.ejb.cmp3.naming.base.InitialContextImpl 29 { 30 public InitialContextImpl() { 31 super(); 32 } 33 34 public InitialContextImpl(Hashtable env) { 35 super(env); 36 } 37 38 39 40 protected Object handleEntityManagerFactory(Object obj) { 41 if (obj instanceof EntityManagerFactory) { 42 debug("Ctx - create EM from bound EMFactory"); 43 return ((EntityManagerFactory)obj).createEntityManager(); 44 } else { 45 return obj; 46 } 47 } 48 } 49 | Popular Tags |