protected abstract class Transactions.BaseTransaction extends Object implements Transactions.Transaction
Modifier and Type | Field and Description |
---|---|
protected String |
id |
protected TransactionManager |
txnMgr |
Modifier | Constructor and Description |
---|---|
protected |
BaseTransaction(TransactionManager txnMgr) |
Modifier and Type | Method and Description |
---|---|
protected void |
executeFunctionsUponCommit() |
protected void |
executeFunctionsUponCompletion() |
String |
id()
Returns a unique identifier for the transaction.
|
protected void |
started() |
int |
status()
Returns the status associated with the current transaction
|
String |
toString() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
commit, rollback
protected final TransactionManager txnMgr
protected final String id
protected BaseTransaction(TransactionManager txnMgr)
protected void started()
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 functionpublic int status() throws SystemException
Transactions.Transaction
status
in interface Transactions.Transaction
int
code representing a transaction status.SystemException
- - If the transaction service fails in an unexpected way.Status
public String id()
Transactions.Transaction
id
in interface Transactions.Transaction
null
protected void executeFunctionsUponCompletion()
protected void executeFunctionsUponCommit()
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.