com.sun.xml.ws.rx.rm.runtime.transaction
Class TransactionHandlerImpl

java.lang.Object
  extended by 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
TransactionHandlerImpl()
           
 
Method Summary
 void begin(int txTimeout)
          Begin the transaction
 boolean canBegin()
          Can UserTransaction be started? Can start only if it doesn't already exist.
 void commit()
          Commit the transaction
 int getStatus()
          javax.transaction.Status of the UserTransaction
 String getStatusAsString()
          javax.transaction.Status as a String.
 boolean isActive()
          Is the UserTransaction active on this thread?
 boolean isMarkedForRollback()
          Is the UserTransaction marked for roll back?
 void rollback()
          Roll back the transaction
 void setRollbackOnly()
          Mark the transaction as roll back only
 boolean transactionExists()
          Is transaction associated with the current thread?
 boolean userTransactionAvailable()
          Is the UserTransaction available?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionHandlerImpl

public TransactionHandlerImpl()
Method Detail

begin

public void begin(int txTimeout)
           throws TransactionException
Description copied from interface: TransactionHandler
Begin the transaction

Specified by:
begin in interface TransactionHandler
Parameters:
txTimeout - Transaction timeout in seconds
Throws:
TransactionException

commit

public void commit()
            throws TransactionException
Description copied from interface: TransactionHandler
Commit the transaction

Specified by:
commit in interface TransactionHandler
Throws:
TransactionException

rollback

public void rollback()
              throws TransactionException
Description copied from interface: TransactionHandler
Roll back the transaction

Specified by:
rollback in interface TransactionHandler
Throws:
TransactionException

setRollbackOnly

public void setRollbackOnly()
                     throws TransactionException
Description copied from interface: TransactionHandler
Mark the transaction as roll back only

Specified by:
setRollbackOnly in interface TransactionHandler
Throws:
TransactionException

userTransactionAvailable

public boolean userTransactionAvailable()
                                 throws TransactionException
Description copied from interface: TransactionHandler
Is the UserTransaction available?

Specified by:
userTransactionAvailable in interface TransactionHandler
Returns:
true if UserTransaction can be looked up from JNDI, otherwise false
Throws:
TransactionException

isActive

public boolean isActive()
                 throws TransactionException
Description copied from interface: TransactionHandler
Is the UserTransaction active on this thread?

Specified by:
isActive in interface TransactionHandler
Returns:
true if UserTransaction status is active
Throws:
TransactionException

isMarkedForRollback

public boolean isMarkedForRollback()
                            throws TransactionException
Description copied from interface: TransactionHandler
Is the UserTransaction marked for roll back?

Specified by:
isMarkedForRollback in interface TransactionHandler
Returns:
true if UserTransaction is marked for roll back
Throws:
TransactionException

canBegin

public boolean canBegin()
Description copied from interface: TransactionHandler
Can UserTransaction be started? Can start only if it doesn't already exist.

Specified by:
canBegin in interface TransactionHandler
Returns:
true if UserTransaction can be started

transactionExists

public boolean transactionExists()
                          throws TransactionException
Description copied from interface: TransactionHandler
Is transaction associated with the current thread?

Specified by:
transactionExists in interface TransactionHandler
Returns:
true if transaction is flowing on the current thread
Throws:
TransactionException

getStatus

public int getStatus()
              throws TransactionException
Description copied from interface: TransactionHandler
javax.transaction.Status of the UserTransaction

Specified by:
getStatus in interface TransactionHandler
Returns:
status integer of the UserTransaction
Throws:
TransactionException

getStatusAsString

public String getStatusAsString()
                         throws TransactionException
Description copied from interface: TransactionHandler
javax.transaction.Status as a String. Useful for logging.

Specified by:
getStatusAsString in interface TransactionHandler
Returns:
status as a String
Throws:
TransactionException


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.