return rc;
}
static TransactionId convert(KahaTransactionInfo transactionInfo) {
if (transactionInfo.hasLocalTransactionId()) {
KahaLocalTransactionId tx = transactionInfo.getLocalTransactionId();
LocalTransactionId rc = new LocalTransactionId();
rc.setConnectionId(new ConnectionId(tx.getConnectionId()));
rc.setValue(tx.getTransactionId());
return rc;
} else {
KahaXATransactionId tx = transactionInfo.getXaTransactionId();
XATransactionId rc = new XATransactionId();
rc.setBranchQualifier(tx.getBranchQualifier().toByteArray());
rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray());
rc.setFormatId(tx.getFormatId());
return rc;
}
}