Search in sources :

Example 6 with ReloadableEntityManagerFactory

use of org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory in project tomee by apache.

the class JtaEntityManagerTest method isJpa21.

@Test
public void isJpa21() {
    final PersistenceUnitInfoImpl info = new PersistenceUnitInfoImpl();
    info.setProperties(new Properties());
    final ClassLoader loader = Thread.currentThread().getContextClassLoader();
    assertTrue(JtaEntityManager.isJPA21(new ReloadableEntityManagerFactory(loader, new EntityManagerFactoryCallable(Jpa21Provider.class.getName(), info, loader, new HashMap<>(), false), info)));
}
Also used : EntityManagerFactoryCallable(org.apache.openejb.assembler.classic.EntityManagerFactoryCallable) HashMap(java.util.HashMap) Properties(java.util.Properties) ReloadableEntityManagerFactory(org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory) Test(org.junit.Test)

Aggregations

ReloadableEntityManagerFactory (org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory)6 Test (org.junit.Test)5 HashMap (java.util.HashMap)2 Properties (java.util.Properties)2 EntityManagerFactory (javax.persistence.EntityManagerFactory)2 Assembler (org.apache.openejb.assembler.classic.Assembler)2 ContainerSystem (org.apache.openejb.spi.ContainerSystem)2 IOException (java.io.IOException)1 URL (java.net.URL)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 Context (javax.naming.Context)1 InitialContext (javax.naming.InitialContext)1 NameNotFoundException (javax.naming.NameNotFoundException)1 NamingException (javax.naming.NamingException)1 Reference (javax.naming.Reference)1 ServletContext (javax.servlet.ServletContext)1