Example usage for org.apache.commons.transaction.util.xa TransactionalResource getXid

List of usage examples for org.apache.commons.transaction.util.xa TransactionalResource getXid

Introduction

In this page you can find the example usage for org.apache.commons.transaction.util.xa TransactionalResource getXid.

Prototype

public Xid getXid();

Source Link

Document

Returns the Xid this transctional resource is associated with.

Usage

From source file:org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.java

public Xid[] recover(int flag) throws XAException {

    getLogger().log("recover() for thread: " + Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);
    TransactionalResource id = getCurrentlyActiveTransactionalResource();

    if (id != null && id.getStatus() == STATUS_PREPARED) {
        Xid[] xids = new Xid[1];
        xids[0] = id.getXid();
        return xids;
    } else//from ww  w  .  j ava 2s . c o m
        return new Xid[0];
}