public final class PlatformTransactionManagerAdapter extends Object implements TransactionManager
PlatformTransactionManager
This is the transaction manager that Teiid
code sees.
If no third party transaction manager found, but there are multiple data
sources are defined, then this class will provide light weight JTA *like*
functionality. Here in case of failure it is totally on the user to manually
rollback any changes if any datasources failed to commit during the commit
run. This transaction manager is best used when we are dealing with only 1
transactional resource.Modifier and Type | Class and Description |
---|---|
static class |
PlatformTransactionManagerAdapter.TransactionHolder |
Constructor and Description |
---|
PlatformTransactionManagerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
addDataSource(BaseConnectionFactory bean) |
void |
addDataSource(DataSource ds) |
void |
begin() |
void |
commit() |
void |
commit(org.springframework.transaction.TransactionStatus status) |
PlatformTransactionManagerAdapter.TransactionHolder |
getOrCreateTransaction(boolean start) |
int |
getStatus() |
Transaction |
getTransaction() |
void |
resume(Transaction tobj) |
void |
rollback() |
void |
rollback(org.springframework.transaction.TransactionStatus status) |
void |
setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager platformTransactionManager) |
void |
setRollbackOnly() |
void |
setTransactionTimeout(int seconds) |
Transaction |
suspend() |
public void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager platformTransactionManager)
public Transaction getTransaction() throws SystemException
getTransaction
in interface TransactionManager
SystemException
public PlatformTransactionManagerAdapter.TransactionHolder getOrCreateTransaction(boolean start)
public void rollback() throws IllegalStateException, SecurityException, SystemException
rollback
in interface TransactionManager
IllegalStateException
SecurityException
SystemException
public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException
commit
in interface TransactionManager
HeuristicMixedException
HeuristicRollbackException
IllegalStateException
RollbackException
SecurityException
SystemException
public void begin() throws NotSupportedException, SystemException
begin
in interface TransactionManager
NotSupportedException
SystemException
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
public void setTransactionTimeout(int seconds) throws SystemException
setTransactionTimeout
in interface TransactionManager
SystemException
public void resume(Transaction tobj) throws IllegalStateException, InvalidTransactionException, SystemException
resume
in interface TransactionManager
IllegalStateException
InvalidTransactionException
SystemException
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface TransactionManager
IllegalStateException
SystemException
public int getStatus() throws SystemException
getStatus
in interface TransactionManager
SystemException
public void addDataSource(DataSource ds)
public void addDataSource(BaseConnectionFactory bean)
public void commit(org.springframework.transaction.TransactionStatus status)
public void rollback(org.springframework.transaction.TransactionStatus status)
Copyright © 2019. All rights reserved.