protected class Transactions.RollbackOnlyTransaction extends Object implements Transactions.Transaction
Modifier | Constructor and Description |
---|---|
protected |
RollbackOnlyTransaction() |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit the transaction currently associated with the calling thread.
|
String |
id()
Returns a unique identifier for the transaction.
|
void |
rollback()
Rolls back the transaction currently associated with the calling thread.
|
int |
status()
Returns the status associated with the current transaction
|
void |
uponCommit(Transactions.TransactionFunction function)
Register a function that will be called after the current transaction has been committed successfully, or immediately if there is not
currently an active transaction.
|
void |
uponCompletion(Transactions.TransactionFunction function)
Register a function that will be called when the current transaction completes.
|
public String id()
Transactions.Transaction
id
in interface Transactions.Transaction
null
public int status()
Transactions.Transaction
status
in interface Transactions.Transaction
int
code representing a transaction status.Status
public void commit()
Transactions.Transaction
commit
in interface Transactions.Transaction
public void rollback()
Transactions.Transaction
rollback
in interface Transactions.Transaction
public void uponCompletion(Transactions.TransactionFunction function)
Transactions.Transaction
uponCompletion
in interface Transactions.Transaction
function
- the completion functionpublic void uponCommit(Transactions.TransactionFunction function)
Transactions.Transaction
uponCommit
in interface Transactions.Transaction
function
- the completion functionCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.