java.lang.Object
io.ebeaninternal.api.SpiTransactionProxy
io.ebeaninternal.api.ScopedTransaction
- All Implemented Interfaces:
Transaction,SpiTransaction,AutoCloseable
Manage scoped (typically thread local) transactions.
These can be nested and internally they are pushed and popped from a stack.
-
Field Summary
Fields inherited from class io.ebeaninternal.api.SpiTransactionProxy
transactionFields inherited from interface io.ebean.Transaction
READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ, SERIALIZABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaughtError(Error e) Rollback for Error.Maybe rollback based on TxScope rollback on settings.voidclose()voidcommit()voidcomplete()Internal programmatic complete - finally block, try to commit.voidExiting an enhanced transactional method.current()Return the current transaction.voidend()getUserObject(String name) Returns the userObject in the stack, Herew we search the stack and return the first found userObjectbooleanReturn true when nested transactions should create Savepoints.voidpush(ScopeTrans scopeTrans) Push the scope transaction.voidputUserObject(String name, Object value) New user objects are always written to the current ScopeTrans.voidrollback()voidvoidvoidvoidtoString()Methods inherited from class io.ebeaninternal.api.SpiTransactionProxy
addBeanChange, addModification, batchControl, checkBatchEscalationOnCascade, checkBatchEscalationOnCollection, commitAndContinue, connection, deactivateExternal, depth, depth, depthDecrement, depthReset, event, flush, flushBatchOnCascade, flushBatchOnCollection, flushBatchOnRollback, getBatchGetGeneratedKeys, getBatchSize, id, internalConnection, isActive, isAutoPersistUpdates, isBatchMode, isBatchOnCascade, isBatchThisRequest, isExplicit, isFlushOnQuery, isLogSql, isLogSummary, isPersistCascade, isReadOnly, isRegisteredBean, isRegisteredDeleteBean, isRollbackOnly, isSaveAssocManyIntersection, isSkipCache, isSkipCacheExplicit, isUpdateAllLoadedProperties, label, logSql, logSummary, logTxn, markNotQueryOnly, persistenceContext, postCommit, postRollback, preCommit, profileEvent, profileLocation, profileOffset, profileStream, register, registerDeferred, registerDeleteBean, sendChangeLog, setAutoPersistUpdates, setBatchControl, setBatchMode, setBatchOnCascade, setBatchSize, setFlushOnMixed, setFlushOnQuery, setGetGeneratedKeys, setLabel, setPersistCascade, setPersistenceContext, setProfileLocation, setProfileStream, setReadOnly, setSkipCache, setTenantId, setUpdateAllLoadedProperties, startNanoTime, tenantId, translate, unregisterBeans
-
Constructor Details
-
ScopedTransaction
-
-
Method Details
-
toString
-
setNestedUseSavepoint
public void setNestedUseSavepoint()- Specified by:
setNestedUseSavepointin interfaceTransaction- Overrides:
setNestedUseSavepointin classSpiTransactionProxy
-
isNestedUseSavepoint
public boolean isNestedUseSavepoint()Description copied from interface:SpiTransactionReturn true when nested transactions should create Savepoints.- Specified by:
isNestedUseSavepointin interfaceSpiTransaction- Overrides:
isNestedUseSavepointin classSpiTransactionProxy
-
push
Push the scope transaction. -
complete
Exiting an enhanced transactional method. -
complete
public void complete()Internal programmatic complete - finally block, try to commit. -
end
public void end() throws jakarta.persistence.PersistenceException- Throws:
jakarta.persistence.PersistenceException
-
close
public void close() -
commit
public void commit() -
rollbackAndContinue
public void rollbackAndContinue() -
rollback
public void rollback() throws jakarta.persistence.PersistenceException- Throws:
jakarta.persistence.PersistenceException
-
rollback
- Throws:
jakarta.persistence.PersistenceException
-
setRollbackOnly
public void setRollbackOnly() -
current
Return the current transaction. -
caughtError
Rollback for Error. -
caughtThrowable
Maybe rollback based on TxScope rollback on settings. -
putUserObject
New user objects are always written to the current ScopeTrans.- Specified by:
putUserObjectin interfaceTransaction- Overrides:
putUserObjectin classSpiTransactionProxy
-
getUserObject
Returns the userObject in the stack, Herew we search the stack and return the first found userObject- Specified by:
getUserObjectin interfaceTransaction- Overrides:
getUserObjectin classSpiTransactionProxy
-