About rollback

1-10 of 88Refresh
Manual
80

Database Connection using JPA

{ 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. All the operations ... until the transaction is ended. If the transaction is ended with a rollback, all the modifications
JDO Doc
80

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
80

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
50

Chapter 3 - Using JPA

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

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
28

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
25

Felix, rollback exception, error 613

Felix, rollback exception, error 613
JPA Doc
15

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
Manual
15

Detached Entity Objects

invocation of rollback or by a commit failure. Explicit Merge Detached objects can be attached
JPA Doc
15

JPA Exceptions

failures that require transaction rollback are represented by: The RollbackException exception usually