Home » Search

About EntityManager

121-130 of 200Refresh
Issue
3

NullPointer when accessing entity field

during the operation. This could happen when an object is accessed in one thread while the EntityManager is manipulated concurrently in another thread (e.g. transaction is committed or the EntityManager is closed). Is it possible that an EntityManager and/or its managed objects were accessed
Forum
2

Optimistic locking: prevent version increment on entity collection attribute

this must be an issue with the EntityManager's life cycle but cannot figure out what. I am using Guice injection and Guice persist and should get one EntityManager per request. Also, please note that in the web ... () {     // em is the EntityManager     em.getTransaction().begin();        Document doc = new
Forum
2

Selective merge/cascade of detatched entity

to: EntityManager em = emf.getEntityManager(); em.getTransaction().begin(); Company company = new Company("new ... : EntityManager em = emf.getEntityManager(); em.getTransaction().begin(); Company company = new Company("new ... .tmp;drop"); EntityManager e = emf.createEntityManager(); e.getTransaction().begin(); Company
Forum
2

JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception

java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax ... ") private EntityManager em;     // Stores a new guest     public void persist(final Guest guest ... .Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext
Forum
2

Memory consumption of empty Strings

.odb");     EntityManager entityManager = entityManagerFactory.createEntityManager ... );       entityManager.getTransaction().begin();       entityManager.persist(entity);       entityManager.getTransaction().commit();       entityManager.clear();     }     entityManager.close
Forum
2

Should derived fields of an EmbeddedId be manually maintained by app code?

.Entity; import javax.persistence.EntityManager; import javax.persistence.FlushModeType; import ... static EContainer getInstance(EntityManager em) { EContainer c = em.find(EContainer.class, "1 ... , EntityManager em) throws TestException { if (lastInstanceInMap == null) { lastInstanceInMap = 0
JPA Doc
2

createEntityManagerFactory(persistenceUnitName)

EntityManagers configured according to the specified persistence unit Since: JPA 1.0
JPA Doc
2

createEntityManagerFactory(persistenceUnitName, properties)

that creates EntityManagers configured according to the specified persistence unit. Since: JPA 1.0
Forum
2

Insertion Speed Rate and Batch Load

the Memory Leak thread uses a separate transaction, and moreover, a new EntityManager per stored entity object. A batch load should reuse the EntityManager and persist a large number of objects ... =             Persistence.createEntityManagerFactory("$objectdb/db/speed.odb");         EntityManager em = emf
JPA Doc
2

javax.persistence.EntityTransaction

javax.persistence Interface EntityTransaction Interface used to control transactions on resource-local entity managers. The EntityManager.getTransaction() method returns the EntityTransaction interface. Since: JPA 1.0 Learn how to use EntityTransaction in Chapter 3 of the ObjectDB/JPA manual. void