Example usage for javax.transaction TransactionManager getStatus

List of usage examples for javax.transaction TransactionManager getStatus

Introduction

In this page you can find the example usage for javax.transaction TransactionManager getStatus.

Prototype

public int getStatus() throws SystemException;

Source Link

Document

Obtain the status of the transaction associated with the current thread.

Usage

From source file:org.wso2.carbon.dataservices.core.description.xa.DSSXATransactionManager.java

public boolean isInDTX() {
    TransactionManager txManager = getTransactionManager();
    if (txManager == null) {
        return false;
    }/*from w  ww . j a va 2 s .co m*/
    try {
        return txManager.getStatus() != Status.STATUS_NO_TRANSACTION;
    } catch (Exception e) {
        log.error("Error at 'hasNoActiveTransaction'", e);
        return false;
    }
}