About rollback

1-10 of 94Refresh
Manual
100

Database Connection using JPA

(); } finally { if (em.getTransaction().isActive()) em.getTransaction().rollback(); } A transaction is started by a call to begin and ended by a call to either commit or rollback ... in memory until the transaction is ended. If the transaction is ended with a rollback
JDO Doc
94

rollback()

Method javax.jdo.Transaction void rollback() Roll back the current transaction. Throws: JDOUserException - if transactions are managed by a container in the managed environment, or if the transaction is not active. Since: JDO 1.0
JPA Doc
94

rollback()

Method 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
Manual
63

Chapter 3 - Using JPA

Explains how to store, retrieve, update and delete entity objects using JPA.
Forum
34

Rollback after commit fail

().rollback(); }   Thread 2: try{ EntityManager em = emf.createEntityManager ... ().commit(); } catch(...){ em.getTransaction().rollback(); }   Parallel running threads ... , but rollback fails with: javax.persistence.TransactionRequiredException Attempt to rollback a transaction
Forum
33

Failed to commit transaction: Attempt to commit a rollback only transaction

to commit a rollback only transaction (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:271 ... as rollback only. In that case - you can only close the transaction with rollback not with commit ... away with this check:             if (currentTx.getRollbackOnly())                 currentTx.rollback
Forum
32

Rollback of several closed transactions

Hello, we use the ObjectDB as embedded database. Sometimes we work with big data and we are forced to split a transaction into several transactions. But then we need actually a rollback for several transactions. Is there any possibility in the ObjectDB to rollback several closed transactions
Forum
29

Felix, rollback exception, error 613

Felix, rollback exception, error 613
JDO Doc
19

javax.jdo.JDOEntityManager

locking failure causes transaction-level rollback the LockTimeoutException will be thrown if the database locking failure causes only statement-level rollback Parameters: entityClass - entity class ... rollback the LockTimeoutException will be thrown if the database locking failure causes
JPA Doc
19

javax.persistence.EntityManager

: the PessimisticLockException will be thrown if the database locking failure causes transaction-level rollback the LockTimeoutException will be thrown if the database locking failure causes only statement-level rollback ... will be thrown if the database locking failure causes transaction-level rollback