Examples of createEntityManager()


Examples of org.apache.openjpa.persistence.OpenJPAEntityManagerFactory.createEntityManager()

        //FIXME jthomas
        //PersistenceManagerFactory factory = getPMFactory(new String[]{
          //  "openjpa.jdbc.SchemaFactory", "native(ForeignKeys=true)",
        //});
        OpenJPAEntityManagerFactory factory=null;
        OpenJPAEntityManager pm = factory.createEntityManager();
        startTx(pm);
       
       deleteAll( MappingTest1.class,pm);
       deleteAll( MappingTest2.class,pm);
        endTx(pm);
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManagerFactory.createEntityManager()

       deleteAll( MappingTest1.class,pm);
       deleteAll( MappingTest2.class,pm);
        endTx(pm);
        pm.close();

        pm = factory.createEntityManager();
        startTx(pm);
        for (int i = 0; i < 10; i++) {
            MappingTest5 pc1 = new MappingTest5();
            pc1.setPk1(i);
            pc1.setPk2(i + 1);
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManagerFactory.createEntityManager()

        endTx(pm);
        pm.close();

        assertSizes(20, MappingTest5.class);

        pm = factory.createEntityManager();
        startTx(pm);
        deleteAll(MappingTest2.class,pm);
        endTx(pm);
        pm.close();
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI.createEntityManager()

 
  public void testPreloadCleanUp() {
        OpenJPAEntityManagerFactorySPI emf = null;
        emf = createNamedEMF(PU_NAME, "openjpa.MetaDataRepository", "Preload=true");
        MetaDataRepository repo = emf.getConfiguration().getMetaDataRepositoryInstance();
        emf.createEntityManager();
        closeEMF(emf);
        assertFalse("The PCRegistry should no longer reference the MetaDataRepository.", PCRegistry
            .removeRegisterClassListener(repo));
    }
View Full Code Here

Examples of org.hibernate.ejb.HibernateEntityManagerFactory.createEntityManager()

   }

   public HibernateIdentityStoreSessionImpl(String persistenceUnit)
   {
      HibernateEntityManagerFactory emFactory = (HibernateEntityManagerFactory)Persistence.createEntityManagerFactory(persistenceUnit);
      hem = (HibernateEntityManager)emFactory.createEntityManager();
   }

   public Object getSessionContext()
   {
      return hem;
View Full Code Here

Examples of org.jboss.jpa.deployment.ManagedEntityManagerFactory.createEntityManager()

         EntityManager em = null;
         ManagedEntityManagerFactory factory=
            ((PersistenceUnitDeployment) PersistenceUnitRegistry.getPersistenceUnit(kernelName)).getManagedFactory();
         if (factory != null)
         {
            em = factory.createEntityManager();
            if (em != null)
            {
               beanContext.addExtendedPersistenceContext(factory.getKernelName(), em);

               /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.