Home » Search

About EntityManager

191-200 of 200Refresh
Forum
1

Query and commit simultaneously

at the same time using multiple threads. However, if all the threads share the same EntityManager ... one after the other, because almost all the operations on the database are synchronized at the EntityManager/PersistenceManager level ... ) and you have to use multiple EntityManager/PersistenceManager instances, usually one per thread. For efficiency
Forum
1

Remove a modified entity cause an optimistic lock exception

.createEntityManagerFactory(                 "objectdb:$objectdb/db/test.tmp;drop");         EntityManager em ... :$objectdb/db/test.tmp;drop");         EntityManager em = emf.createEntityManager();         em.setFlushMode ... to the wrong EntityManager, i.e. to the one that is used to persist the object
Forum
1

Schema Update: class hierarchy change

.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence ...     .createEntityManagerFactory("objectdb:$objectdb/db/test.tmp;drop");   EntityManager em = emf ... .EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence
Issue
1

Server out of memory exceptions

read/write operation is done via a new EntityManager which is closed straight ... . > 60 threads after about 2 minutes). Each thread manages its own EntityManager, which may consume a lot ... should be taking to dispose of EntityManagers then? I actually thought it would be creating
Forum
1

Spring MVC Errors

often get an error that query is using a closed EntityManager although I use that @Autowired ... "; private EntityManager em; public DBconn() { em = Persistence ... (); } public EntityManager getEm() { return em
Forum
1

Unable to persist TreeMap

; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import ... \\workspace\\TestProject\\Storage.odb");         EntityManager em = emf.createEntityManager ... .util.Map; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory
Forum
1

Using the wrong class to access a database

"); EntityManager em = emf.createEntityManager(); create(em); retrieve(em ... (); } static void create(EntityManager em) { em.getTransaction().begin(); for (int i = 0; i < 1000 ... (); } static void retrieve(EntityManager em) { // 1 Query q1 = em.createQuery("SELECT COUNT(p) FROM
Issue
1

Weird issue with variable naming

; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import ... _F329.tmp;drop");   EntityManager em = emf.createEntityManager();   em.getTransaction().begin ... .persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax
Forum
1

A lot of ENT and SIV instances which are not cleared by GC

simple EJB managers containing EntityManagers. On bean's PreDestroy and in servlet's i make entityManager.clear(); Every managed entity object is associated with an helper ENT object. entityManager.clear
Forum
1

Compare old and new schema

.   Thanks, Farid Hi, After investigation it turns out that opening a standard EntityManager ... opened an EntityManager on a copy of the database file. I can now use a standard getMetamodel() method on the EntityManager to get the database model as it is in the database file. Now, I need the new