public class TransactionManager
extends java.lang.Object
implements javax.transaction.TransactionManager, javax.transaction.UserTransaction
Modifier and Type | Method and Description |
---|---|
void |
begin() |
void |
commit() |
static TransactionManager |
getInstance() |
int |
getStatus() |
javax.transaction.Transaction |
getTransaction() |
boolean |
isInTransaction() |
void |
resume(javax.transaction.Transaction arg0) |
void |
rollback() |
void |
setRollbackOnly() |
void |
setTransactionTimeout(int arg0) |
javax.transaction.Transaction |
suspend() |
public static TransactionManager getInstance()
public boolean isInTransaction()
public void begin() throws javax.transaction.NotSupportedException, javax.transaction.SystemException
begin
in interface javax.transaction.TransactionManager
begin
in interface javax.transaction.UserTransaction
javax.transaction.NotSupportedException
javax.transaction.SystemException
public void commit() throws javax.transaction.RollbackException, javax.transaction.HeuristicMixedException, javax.transaction.HeuristicRollbackException, java.lang.SecurityException, java.lang.IllegalStateException, javax.transaction.SystemException
commit
in interface javax.transaction.TransactionManager
commit
in interface javax.transaction.UserTransaction
javax.transaction.RollbackException
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
javax.transaction.SystemException
public int getStatus() throws javax.transaction.SystemException
getStatus
in interface javax.transaction.TransactionManager
getStatus
in interface javax.transaction.UserTransaction
javax.transaction.SystemException
public javax.transaction.Transaction getTransaction() throws javax.transaction.SystemException
getTransaction
in interface javax.transaction.TransactionManager
javax.transaction.SystemException
public void resume(javax.transaction.Transaction arg0) throws javax.transaction.InvalidTransactionException, java.lang.IllegalStateException, javax.transaction.SystemException
resume
in interface javax.transaction.TransactionManager
javax.transaction.InvalidTransactionException
java.lang.IllegalStateException
javax.transaction.SystemException
public void rollback() throws java.lang.IllegalStateException, java.lang.SecurityException, javax.transaction.SystemException
rollback
in interface javax.transaction.TransactionManager
rollback
in interface javax.transaction.UserTransaction
java.lang.IllegalStateException
java.lang.SecurityException
javax.transaction.SystemException
public void setRollbackOnly() throws java.lang.IllegalStateException, javax.transaction.SystemException
setRollbackOnly
in interface javax.transaction.TransactionManager
setRollbackOnly
in interface javax.transaction.UserTransaction
java.lang.IllegalStateException
javax.transaction.SystemException
public void setTransactionTimeout(int arg0) throws javax.transaction.SystemException
setTransactionTimeout
in interface javax.transaction.TransactionManager
setTransactionTimeout
in interface javax.transaction.UserTransaction
javax.transaction.SystemException
public javax.transaction.Transaction suspend() throws javax.transaction.SystemException
suspend
in interface javax.transaction.TransactionManager
javax.transaction.SystemException
Copyright © 2021. All Rights Reserved.