|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.jta.UserTransactionAdapter
public class UserTransactionAdapter
Adapter for a JTA UserTransaction handle, taking a JTA TransactionManager reference and creating a JTA UserTransaction handle for it.
The JTA UserTransaction interface is an exact subset of the JTA TransactionManager interface. Unfortunately, it does not serve as super-interface of TransactionManager, though, which requires an adapter such as this class to be used when intending to talk to a TransactionManager handle through the UserTransaction interface.
Used internally by Spring's JtaTransactionManager for certain scenarios. Not intended for direct use in application code.
Constructor Summary | |
---|---|
UserTransactionAdapter(TransactionManager transactionManager)
Create a new UserTransactionAdapter. |
Method Summary | |
---|---|
void |
begin()
|
void |
commit()
|
int |
getStatus()
|
TransactionManager |
getTransactionManager()
Return the JTA TransactionManager that this adapter delegates to. |
void |
rollback()
|
void |
setRollbackOnly()
|
void |
setTransactionTimeout(int timeout)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserTransactionAdapter(TransactionManager transactionManager)
transactionManager
- the JTA TransactionManagerMethod Detail |
---|
public TransactionManager getTransactionManager()
public void begin() throws NotSupportedException, SystemException
begin
in interface UserTransaction
NotSupportedException
SystemException
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
commit
in interface UserTransaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException
public int getStatus() throws SystemException
getStatus
in interface UserTransaction
SystemException
public void rollback() throws IllegalStateException, SecurityException, SystemException
rollback
in interface UserTransaction
IllegalStateException
SecurityException
SystemException
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface UserTransaction
IllegalStateException
SystemException
public void setTransactionTimeout(int timeout) throws SystemException
setTransactionTimeout
in interface UserTransaction
SystemException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |