Home » Search

About EntityManager

191-200 of 200Refresh
Forum
1

Possible issue with LAZY Loading

is accessible if entity objects are managed by an open EntityManager, but it is fetched lazily when needed. You do see a difference (in addition to performance differences) when the EntityManager is closed ... either. Ok, so then I believe Lazy loading is broken, cause if I close the entityManager without calling
Forum
1

Problem undeploying Glassfish3.1.1 web application cleanly

EntityManager injection, using the undeploy feature under the Glassfish server node  of Netbeans7.1 ... (which also uses @PersistenceContext EntityManager injection)? > Is it possible to get this exception with the simple tutorial GuestBook example (which also uses @PersistenceContext EntityManager
Forum
1

problem with lazy loading - unittest project attached

that when the test is not annotated with @Transactional - an ad hoc EntityManager instance is prepared for running findOne, and when the query execution completes that EntityManager is closed and the result object ... should have his own transaction. spring does not allow me to call entityManager.getTransaction().begin()/commit
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