Package org.wildfly.transaction.client
Class LocalUserTransaction
java.lang.Object
org.wildfly.transaction.client.LocalUserTransaction
- All Implemented Interfaces:
Serializable,UserTransaction
A
UserTransaction instance that controls the transaction state of the current local provider.- Author:
- David M. Lloyd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()voidcommit()static LocalUserTransactionGet the singleton instance.intbooleanvoidrollback()voidsetAvailability(boolean available) voidvoidsetTransactionTimeout(int seconds)
-
Method Details
-
begin
- Specified by:
beginin interfaceUserTransaction- Throws:
NotSupportedExceptionSystemException
-
commit
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException- Specified by:
commitin interfaceUserTransaction- Throws:
RollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSecurityExceptionIllegalStateExceptionSystemException
-
rollback
- Specified by:
rollbackin interfaceUserTransaction- Throws:
IllegalStateExceptionSecurityExceptionSystemException
-
setRollbackOnly
- Specified by:
setRollbackOnlyin interfaceUserTransaction- Throws:
IllegalStateExceptionSystemException
-
getStatus
- Specified by:
getStatusin interfaceUserTransaction- Throws:
SystemException
-
setTransactionTimeout
- Specified by:
setTransactionTimeoutin interfaceUserTransaction- Throws:
SystemException
-
setAvailability
public void setAvailability(boolean available) -
isAvailable
public boolean isAvailable() -
getInstance
Get the singleton instance.- Returns:
- the singleton instance
-