| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this transaction is rollback onlyIs this transaction marked for rollback only |
| public Object | |
| public Object | Returns: the transaction key, or null if there is no transactionGet the key associated with the current transaction |
| public TransactionStatus | |
| public boolean | Returns: true if the TransactionContext supports read-only optimizations and the transaction was marked read only. In particular it is legal for this method to return false even if the transaction was marked read only by the initiating client.
|
| public void | postCompletion(Consumer<TransactionStatus> job)
Register a callback that will be made after the scope completes
For transactional scopes the state of the scope will be either
|
| public void | preCompletion(Runnable
The action to perform before completing the scope job)Register a callback that will be made before a scope completes. |
| public void | |
| public void | |
| public void | registerXAResource(javax.
The resource id to be used for recovery, the id may be
recoveryId)null if this resource is not recoverable.
If an id is passed then a
If the underlying Register an XA resource with the current transaction |
| public void | |
| public boolean | |
| public boolean |
| getRollbackOnly | back to summary |
|---|---|
| public boolean getRollbackOnly() throws IllegalStateException Is this transaction marked for rollback only
| |
| getScopedValue | back to summary |
|---|---|
| public Object getScopedValue(Object key) Get a value scoped to this transaction
| |
| getTransactionKey | back to summary |
|---|---|
| public Object getTransactionKey() Get the key associated with the current transaction
| |
| getTransactionStatus | back to summary |
|---|---|
public TransactionStatus getTransactionStatus()
| |
| isReadOnly | back to summary |
|---|---|
public boolean isReadOnly()
| |
| postCompletion | back to summary |
|---|---|
| public void postCompletion(Consumer<TransactionStatus> job) throws IllegalStateException Register a callback that will be made after the scope completes
For transactional scopes the state of the scope will be either
For no-transaction scopes the state of the scope will always be
Post-completion callbacks should not throw
| |
| preCompletion | back to summary |
|---|---|
| public void preCompletion(Runnable job) throws IllegalStateException Register a callback that will be made before a scope completes.
For transactional scopes the state of the scope will be either
For no-transaction scopes the state of the scope will always be
Exceptions thrown by pre-completion callbacks are treated as if they were thrown by the scoped work, including any configured commit or rollback behaviors for transactional scopes.
| |
| putScopedValue | back to summary |
|---|---|
| public void putScopedValue(Object key, Object value) Associate a value with this transaction | |
| registerLocalResource | back to summary |
|---|---|
| public void registerLocalResource(LocalResource resource) throws IllegalStateException Register a Local resource with the current transaction
| |
| registerXAResource | back to summary |
|---|---|
| public void registerXAResource(javax. Register an XA resource with the current transaction
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() throws IllegalStateException Mark this transaction for rollback
| |
| supportsLocal | back to summary |
|---|---|
public boolean supportsLocal()
| |
| supportsXA | back to summary |
|---|---|
public boolean supportsXA()
| |