Class TransactionHandlerImpl
- java.lang.Object
-
- com.sun.xml.ws.rx.rm.runtime.transaction.TransactionHandlerImpl
-
- All Implemented Interfaces:
TransactionHandler
public class TransactionHandlerImpl extends Object implements TransactionHandler
- Author:
- Uday Joshi
-
-
Constructor Summary
Constructors Constructor Description TransactionHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin(int txTimeout)Begin the transactionbooleancanBegin()Can UserTransaction be started? Can start only if it doesn't already exist.voidcommit()Commit the transactionintgetStatus()javax.transaction.Status of the UserTransactionStringgetStatusAsString()javax.transaction.Status as a String.booleanisActive()Is the UserTransaction active on this thread?booleanisMarkedForRollback()Is the UserTransaction marked for roll back?voidrollback()Roll back the transactionvoidsetRollbackOnly()Mark the transaction as roll back onlybooleantransactionExists()Is transaction associated with the current thread?booleanuserTransactionAvailable()Is the UserTransaction available?
-
-
-
Method Detail
-
begin
public void begin(int txTimeout) throws TransactionExceptionDescription copied from interface:TransactionHandlerBegin the transaction- Specified by:
beginin interfaceTransactionHandler- Parameters:
txTimeout- Transaction timeout in seconds- Throws:
TransactionException
-
commit
public void commit() throws TransactionExceptionDescription copied from interface:TransactionHandlerCommit the transaction- Specified by:
commitin interfaceTransactionHandler- Throws:
TransactionException
-
rollback
public void rollback() throws TransactionExceptionDescription copied from interface:TransactionHandlerRoll back the transaction- Specified by:
rollbackin interfaceTransactionHandler- Throws:
TransactionException
-
setRollbackOnly
public void setRollbackOnly() throws TransactionExceptionDescription copied from interface:TransactionHandlerMark the transaction as roll back only- Specified by:
setRollbackOnlyin interfaceTransactionHandler- Throws:
TransactionException
-
userTransactionAvailable
public boolean userTransactionAvailable() throws TransactionExceptionDescription copied from interface:TransactionHandlerIs the UserTransaction available?- Specified by:
userTransactionAvailablein interfaceTransactionHandler- Returns:
- true if UserTransaction can be looked up from JNDI, otherwise false
- Throws:
TransactionException
-
isActive
public boolean isActive() throws TransactionExceptionDescription copied from interface:TransactionHandlerIs the UserTransaction active on this thread?- Specified by:
isActivein interfaceTransactionHandler- Returns:
- true if UserTransaction status is active
- Throws:
TransactionException
-
isMarkedForRollback
public boolean isMarkedForRollback() throws TransactionExceptionDescription copied from interface:TransactionHandlerIs the UserTransaction marked for roll back?- Specified by:
isMarkedForRollbackin interfaceTransactionHandler- Returns:
- true if UserTransaction is marked for roll back
- Throws:
TransactionException
-
canBegin
public boolean canBegin()
Description copied from interface:TransactionHandlerCan UserTransaction be started? Can start only if it doesn't already exist.- Specified by:
canBeginin interfaceTransactionHandler- Returns:
- true if UserTransaction can be started
-
transactionExists
public boolean transactionExists() throws TransactionExceptionDescription copied from interface:TransactionHandlerIs transaction associated with the current thread?- Specified by:
transactionExistsin interfaceTransactionHandler- Returns:
- true if transaction is flowing on the current thread
- Throws:
TransactionException
-
getStatus
public int getStatus() throws TransactionExceptionDescription copied from interface:TransactionHandlerjavax.transaction.Status of the UserTransaction- Specified by:
getStatusin interfaceTransactionHandler- Returns:
- status integer of the UserTransaction
- Throws:
TransactionException
-
getStatusAsString
public String getStatusAsString() throws TransactionException
Description copied from interface:TransactionHandlerjavax.transaction.Status as a String. Useful for logging.- Specified by:
getStatusAsStringin interfaceTransactionHandler- Returns:
- status as a String
- Throws:
TransactionException
-
-