public class WebSphereExtendedJtaPlatform.TransactionManagerAdapter extends Object implements TransactionManager
Modifier and Type | Class and Description |
---|---|
class |
WebSphereExtendedJtaPlatform.TransactionManagerAdapter.TransactionAdapter |
Modifier and Type | Method and Description |
---|---|
void |
begin()
Starts a new transaction, and associate it with the calling thread.
|
void |
commit()
Commit the transaction associated with the calling thread.
|
int |
getStatus()
Get the status of the transaction associated with the calling thread.
|
Transaction |
getTransaction()
Get the transaction associated with the calling thread.
|
void |
resume(Transaction txn)
Resume the association of the calling thread with the given
transaction.
|
void |
rollback()
Rolls back the transaction associated with the calling thread.
|
void |
setRollbackOnly()
Mark the transaction associated with the calling thread for rollback
only.
|
void |
setTransactionTimeout(int i)
Change the transaction timeout for transactions started by the calling
thread with the
TransactionManager.begin() method. |
Transaction |
suspend()
Suspend the association the calling thread has to a transaction,
and return the suspended transaction.
|
public void begin() throws NotSupportedException, SystemException
TransactionManager
begin
in interface TransactionManager
NotSupportedException
- If the calling thread is already
associated with a transaction, and nested transactions are
not supported.SystemException
- If the transaction service fails in an
unexpected way.public void commit() throws UnsupportedOperationException
TransactionManager
commit
in interface TransactionManager
UnsupportedOperationException
public int getStatus() throws SystemException
TransactionManager
getStatus
in interface TransactionManager
Status
constants. If no transaction is associated
with the calling thread,
Status.STATUS_NO_TRANSACTION
is returned.SystemException
- If the transaction service fails in an
unexpected way.public Transaction getTransaction() throws SystemException
TransactionManager
getTransaction
in interface TransactionManager
null
if the calling thread is not associated
with a transaction.SystemException
- If the transaction service fails in an
unexpected way.public void resume(Transaction txn) throws UnsupportedOperationException
TransactionManager
resume
in interface TransactionManager
txn
- The transaction to be associated with the calling thread.UnsupportedOperationException
public void rollback() throws UnsupportedOperationException
TransactionManager
rollback
in interface TransactionManager
UnsupportedOperationException
public void setRollbackOnly() throws UnsupportedOperationException
TransactionManager
setRollbackOnly
in interface TransactionManager
UnsupportedOperationException
public void setTransactionTimeout(int i) throws UnsupportedOperationException
TransactionManager
TransactionManager.begin()
method.setTransactionTimeout
in interface TransactionManager
i
- The new timeout value, in seconds. If this parameter
is 0
, the timeout value is reset to the default
value.UnsupportedOperationException
public Transaction suspend() throws UnsupportedOperationException
TransactionManager
suspend
in interface TransactionManager
null
if the calling thread was not associated
with a transaction.UnsupportedOperationException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.