Internal Website Search
1-27 of 27 resultsDatabase Connection using JPA the content of a database require active transactions. Transactions are managed by an EntityTransaction ... ); EntityTransaction Operations that affect the content of the database (store, update, delete) must be performed within an active transaction. The EntityTransaction interface represents and manages database | |
Obtaining a JPA Database Connection content also require an EntityTransaction instance. Obtaining an EntityManagerFactory Obtaining ... an EntityTransaction Operations that modify database content, such as store, update, and delete ... an EntityManager instance and its associated EntityTransaction instances that the getTransaction method | |
javax.persistence.EntityTransaction JPA Interface EntityTransaction Interface used to control transactions on resource-local entity managers. The EntityManager.getTransaction() method returns the EntityTransaction interface. Since: JPA 1.0 The Database Connection using JPA article explains how to use EntityTransaction . Public | |
EntityTransaction.commit() does not release a pessimistic lock It appears that EntityTransaction .commit() does not release a pessimistic lock - test code below. I tried it in with the current (2.7.6_01) and older versions (2.6.9, 2.5.7, 2.4.7) with the same result. (side note: EntityTransaction .rollback() releases it correctly) // Account.java package icke | |
EntityTransaction.rollback() - JPA Method JPA Method in javax.persistence. EntityTransaction void rollback () Roll back the current resource transaction. Throws: IllegalStateException - if isActive() is false PersistenceException - if an unexpected error condition is encountered Since: JPA 1.0 | |
EntityTransaction.commit() - JPA Method JPA Method in javax.persistence. EntityTransaction void commit () Commit the current resource transaction, writing any unflushed changes to the database. Throws: IllegalStateException - if isActive() is false RollbackException - if the commit fails Since: JPA 1.0 | |
EntityTransaction.begin() - JPA Method JPA Method in javax.persistence. EntityTransaction void begin () Start a resource transaction. Throws: IllegalStateException - if isActive() is true Since: JPA 1.0 | |
EntityTransaction.getRollbackOnly() - JPA Method JPA Method in javax.persistence. EntityTransaction boolean getRollbackOnly () Determine whether the current resource transaction has been marked for rollback. Return: boolean indicating whether the transaction has been marked for rollback Throws: IllegalStateException - if isActive() is false Since: JPA 1.0 | |
EntityTransaction.setRollbackOnly() - JPA Method JPA Method in javax.persistence. EntityTransaction void setRollbackOnly () Mark the current resource transaction so that the only possible outcome of the transaction is for the transaction to be rolled back. Throws: IllegalStateException - if isActive() is false Since: JPA 1.0 | |
EntityTransaction.isActive() - JPA Method JPA Method in javax.persistence. EntityTransaction boolean isActive () Indicate whether a resource transaction is in progress. Return: boolean indicating whether transaction is in progress Throws: PersistenceException - if an unexpected error condition is encountered Since: JPA 1.0 | |
javax.persistence.EntityManager EntityTransaction getTransaction () Return the resource-level EntityTransaction object. The EntityTransaction instance may be used serially to begin and commit multiple transactions. Return: EntityTransaction instance Throws: IllegalStateException - if invoked on a JTA entity manager Since: JPA 1.0 | |
EntityManager.getTransaction() - JPA Method JPA Method in javax.persistence.EntityManager EntityTransaction getTransaction () Return the resource-level EntityTransaction object. The EntityTransaction instance may be used serially to begin and commit multiple transactions. Return: EntityTransaction instance Throws: IllegalStateException - if invoked on a JTA entity manager Since: JPA 1.0 | |
javax.persistence.RollbackException; javax.persistence.RollbackException Thrown by the persistence provider when () EntityTransaction .commit() fails. See Also: javax.persistence. EntityTransaction .commit () Since: JPA 1.0 Public Constructors | |
Bug: ClassCastException by retrieval; import javax.persistence.EntityManagerFactory; import javax.persistence. EntityTransaction ; import javax ... .createEntityManager(); EntityTransaction trans = em.getTransaction(); //* block-1 | |
Unexpected NoSuchFieldError exception.persistence. EntityTransaction $begin.call(Unknown Source) at app.database.ObjectDbDatabase.transact ... ) at javax.persistence. EntityTransaction $begin.call(Unknown Source) at app.database.ObjectDbDatabase | |
JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception methodName ) { javax.persistence. EntityTransaction et = em.getTransaction(); if ( et.isActive ... . EntityTransaction et = em.getTransaction(); javax.persistence.metamodel.ManagedType type = em.getMetamodel | |
Mysterious "Attempt to persist a reference to a non managed instance" error.EntityManagerFactory; import javax.persistence. EntityTransaction ; import javax.persistence.Persistence; import com ... ; EntityTransaction tx = em.getTransaction(); tx.begin();   | |
javax.persistence.LockModeType must throw the PessimisticLockException and ensure that the JTA transaction or EntityTransaction | |
zip file or JAR manifest missing PageTest { protected static EntityTransaction trans = SingleManager.getTrans(); protected static | |
failure to enforce NOT NULL for java.lang.String.createEntityManager(); EntityTransaction tr = em.getTransaction(); Request r = new Request(); r.setUsername(null | |
"Attempt to lock a non entity object" error() on a JPA EntityTransaction and I'm still getting the same error. Am I missing | |
How to delete M2M relationship?(EntityManager em, Timeslot ts) { EntityTransaction transaction = em.getTransaction(); try { ArrayList | |
Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error; EntityTransaction tx = em.getTransaction(); tx.begin(); em.merge(new | |
Method Invocation On All Entities(); EntityTransaction trans = em.getTransaction(); trans.begin(); em.createQuery("DELETE FROM MyEntity | |
Query results are not up to date for entities, not primitives("PersistenceUnit"); EntityManager em2 = emf .createEntityManager(); EntityTransaction tr = em2   | |
Error 363 - Failed to read value of inverse relationship static boolean save(Object obj) { EntityTransaction tr | |
objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'"); } else { EntityTransaction t = em.getTransaction(); log_info($i, "em.transaction.isActive", t.isActive()); } } reset ... ) { log_warn($i, "AFTER: transaction is null!"); } else { EntityTransaction t = em.getTransaction(); log |