Internal Website Search

1-50 of 94 results

Rollback after commit fail

em.getTransaction().commit(); } catch(...){ em.getTransaction(). rollback (); }   Thread 2: try ... object1 em.getTransaction().commit(); } catch(...){ em.getTransaction(). rollback (); }   Parallel ... ), the exception is caught, but rollback fails with: javax.persistence.TransactionRequiredException Attempt

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

a rollback only transaction (error 613) at com.objectdb.jpa.EMImpl.commit(EMImpl.java:271) at javax ... an active transaction as rollback only. In that case - you can only close the transaction with rollback not with commit . Maybe your application caught the exception and then tried to commit. support

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? btc

Database Connection using JPA

(). 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 on the database ... . If the transaction is ended with a rollback , all the modifications to the database are discarded

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

Hitting Evaluation Limit After Code Rollback

Hitting Evaluation Limit After Code Rollback

Felix, rollback exception, error 613

Felix, rollback exception, error 613

JPA Lifecycle Events

within an active transaction, the transaction is marked for rollback and no more callback methods are invoked

Detached Entity Objects

of rollback or by a commit failure. Explicit Merge Detached objects can be attached to any

Locking in JPA

released at the end of the transaction (using either commit or rollback ). ObjectDB supports

JPA Exceptions

transaction is represented by: Database update failures that require transaction rollback are represented by

javax.persistence.EntityManager

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 ... transaction-level rollback the LockTimeoutException will be thrown if the database locking failure

"Attempt to lock a non entity object" error

object" session. rollback () is somehow causing the problem (found through debugging ... ;   session. rollback (); . . . } //doCancelEdit ... and detach all managed entity objects: ... Rolling back a transaction - either by invocation of rollback or

[ODB1] Chapter 5 - JDO Connections

{ if (pm.currentTransaction().isActive()) pm.currentTransaction(). rollback (); if (!pm.isClosed()) pm.close ... .currentTransaction().isActive()) pm.currentTransaction(). rollback (); if (!pm.isClosed()) pm.close ... () or rollback () . All the operations on the database within these boundaries are associated

javax.persistence.LockModeType

cannot be obtained, and the database locking failure results in transaction-level rollback , the provider ... has been marked for rollback . When the lock cannot be obtained, and the database locking failure results in only statement-level rollback , the provider must throw the LockTimeoutException (and must not mark

Dirty checking

, what is the purpose of comitting it? I see, so I just drop the transaction? Don't I have to either rollback or ... . Rollback is fine, of course, and with your detailed explanations it is clear now why you need ... , just List collections. Regarding rollback , the JPA state diagram seems to indicate that post commit

Step 4: Add a Servlet Class

.getTransaction(). rollback (); em.close(); } } @Override protected void doPost( HttpServletRequest request

Step 4: Add a Servlet Class

: if (em.getTransaction().isActive()) em.getTransaction(). rollback (); em.close(); } } @Override

Transaction.rollback() - JDO Method

JDO Method in 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

javax.persistence.EntityTransaction

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 boolean ... is encountered Since: JPA 1.0 void rollback () Roll back the current resource transaction. Throws

javax.persistence.LockTimeoutException

locking conflict occurs that does not result in transaction rollback . This exception may be thrown as ... be marked for rollback . Since: JPA 2.0 Public Constructors LockTimeoutException () Constructs a new

EntityManager.refresh(entity,lockMode,properties) - JPA Method

if the database locking failure causes transaction-level rollback the LockTimeoutException will be thrown if the database locking failure causes only statement-level rollback If a vendor-specific

EntityManager.lock(entity,lockMode,properties) - JPA Method

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 If a vendor

EntityManager.lock(entity,lockMode) - JPA Method

rollback the LockTimeoutException will be thrown if the database locking failure causes only statement-level rollback Parameters: entity - entity instance lockMode - lock mode Throws

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

EntityManager.refresh(entity,lockMode) - JPA Method

: the PessimisticLockException will be thrown if the database locking failure causes transaction-level rollback ... rollback . Parameters: entity - entity instance lockMode - lock mode Throws: IllegalArgumentException

EntityManager.find(entityClass,primaryKey,lockMode) - JPA Method

-level rollback the LockTimeoutException will be thrown if the database locking failure causes only statement-level rollback Parameters: entityClass - entity class primaryKey - primary key lockMode - lock

EntityManager.find(entityClass,primaryKey,lockMode,properties) - JPA Method

: 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

javax.persistence.EntityExistsException

, will be marked for rollback . If the entity already exists, the EntityExistsException may be thrown ... context has been joined to it, will be marked for rollback . See Also: javax.persistence.EntityManager

[ODB1] Chapter 2 - A Quick Tour

.currentTransaction(). rollback (); 53 if (!pm.isClosed()) 54 pm.close(); 55 } 56 } 57 58 // Handle ... the transaction with rollback () discards all the changes done during its activity (line 52). Lines 58-61

javax.persistence.EntityNotFoundException

to it, will be marked for rollback . See Also: EntityManager.getReference EntityManager.refresh EntityManager

javax.persistence.PessimisticLockException

time. The current transaction, if one is active, will be marked for rollback . Since: JPA 2.0 Public

javax.persistence.OptimisticLockException

time. The current transaction, if one is active, will be marked for rollback . See Also: EntityManager

javax.persistence.NonUniqueResultException

, to be marked for rollback . See Also: Query.getSingleResult () TypedQuery.getSingleResult () Since: JPA 1.0

javax.persistence.NoResultException

will not cause the current transaction, if one is active, to be marked for rollback

javax.persistence.PersistenceException

has been joined to it, to be marked for rollback . Since: JPA 1.0 Public Constructors PersistenceException

javax.persistence.QueryTimeoutException

be marked for rollback . Since: JPA 2.0 Public Constructors QueryTimeoutException () Constructs a new

[ODB1] Chapter 6 - Persistent Objects

, following the persistence by reachability rule. Of course, if the transaction is ended with rollback

[ODB1] Chapter 3 - Persistent Classes

when the persistent fields are going to be cleared at transaction end (for example on rollback ). This event is rarely

[ODB1] Chapter 4 - JDO Metadata

the database. The main difference is that, on transaction rollback , it returns automatically

objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'

.9_06] javax.persistence.TransactionRequiredException Attempt to rollback a transaction ... Attempt to rollback a transaction when no transaction is active (error 611) at com.objectdb.jpa.EMImpl ... ] javax.persistence.PersistenceException Attempt to rollback a transaction using a closed

Best practise loading big data

? maybe you can use rollback or clear instead of commit? Do you always use only enhanced classes ... so we do not need to commit - commit is a NOOP. If it is faster to rollback or just to clear ... expect performance improvements with rollback / clear, although it makes more sense to use them and maybe

javax.jdo.Transaction

boolean getRollbackOnly () Returns the rollback -only status of the transaction. When begun, the rollback ... setRollbackOnly. Return: true if the transaction has been marked for rollback . Since: JDO 2.0 boolean ... is active. Since: JDO 1.0 void rollback () Roll back the current transaction. Throws

Transaction.getRollbackOnly() - JDO Method

JDO Method in javax.jdo.Transaction boolean getRollbackOnly () Returns the rollback -only status of the transaction. When begun, the rollback -only status is false. Either the application or the JDO implementation may set this flag using setRollbackOnly. Return: true if the transaction has been marked for rollback . Since: JDO 2.0

PersistenceManagerFactory.setRestoreValues(restoreValues) - JDO Method

JDO Method in javax.jdo.PersistenceManagerFactory void setRestoreValues (   boolean restoreValues ) Set the default value for the RestoreValues property. If true , at rollback , fields ... . If false , at rollback , the values of fields of newly persistent instances are unchanged

javax.jdo.PersistenceManagerFactory

, at rollback , fields of newly persistent instances are restored to their values as of the beginning ... of the transaction. If false , at rollback , the values of fields of newly persistent instances are unchanged

Transaction.setRestoreValues(restoreValues) - JDO Method

JDO Method in javax.jdo.Transaction void setRestoreValues (   boolean restoreValues ) If true , at rollback , fields of newly persistent instances are restored to their values as ... of the beginning of the transaction. If false , at rollback , the values of fields of newly persistent

Transaction.setRollbackOnly() - JDO Method

JDO Method in javax.jdo.Transaction void setRollbackOnly () Sets the rollback -only status of the transaction to true . After this flag is set to true , the transaction can no longer be committed, and any attempt to commit the transaction will throw JDOFatalDataStoreException . Since: JDO 2.0

javax.jdo.listener.ClearLifecycleListener

during an application call to evict, and in afterCompletion for commit with RetainValues false and rollback

ClearLifecycleListener.preClear(event) - JDO Method

with RetainValues false and rollback with RestoreValues false. The method is called during any state transition