public class JTAUserTransactionAdapter extends Object implements TransactionManagerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected TransactionManager |
mgr |
| Constructor and Description |
|---|
JTAUserTransactionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Create a new transaction and associate it with
the current thread.
|
Transaction |
beginSuspending() |
void |
commit()
Complete the transaction associated with the
current thread.
|
int |
getStatus()
Obtain the status of the transaction associated
with the current thread.
|
void |
resume(Transaction transaction) |
void |
rollback()
Roll back the transaction associated with the
current thread.
|
void |
setRollbackOnly()
Modify the transaction associated with the current
thread such that the only possible outcome of the
transaction is to roll back the transaction.
|
void |
setTransactionTimeout(int seconds)
Modify the value of the timeout value that is
associated with the transactions started by the
current thread with the begin method.
|
protected TransactionManager mgr
public void begin()
throws TransactionManagementException
TransactionManagerAdapterbegin in interface TransactionManagerAdapterTransactionManagementExceptionpublic Transaction beginSuspending() throws TransactionManagementException
TransactionManagementExceptionpublic void resume(Transaction transaction)
public void commit()
throws TransactionManagementException
TransactionManagerAdaptercommit in interface TransactionManagerAdapterTransactionManagementExceptionpublic void rollback()
throws TransactionManagementException
TransactionManagerAdapterrollback in interface TransactionManagerAdapterTransactionManagementExceptionpublic int getStatus()
throws TransactionManagementException
TransactionManagerAdaptergetStatus in interface TransactionManagerAdapterTransactionManagementExceptionpublic void setRollbackOnly()
throws TransactionManagementException
TransactionManagerAdaptersetRollbackOnly in interface TransactionManagerAdapterTransactionManagementExceptionpublic void setTransactionTimeout(int seconds)
throws TransactionManagementException
TransactionManagerAdaptersetTransactionTimeout in interface TransactionManagerAdapterseconds - seconds - The value of the timeout
in seconds. If the value is zero, the transaction
service restores the default value.TransactionManagementExceptionCopyright © 2023 The Apache Software Foundation. All rights reserved.