git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1361227 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-07-13 14:10:31 +00:00
parent f84e41611c
commit 6b203be068
4 changed files with 36 additions and 36 deletions

View File

@ -573,15 +573,15 @@ public class KahaDBPersistenceAdapter implements PersistenceAdapter, BrokerServi
LocalTransactionId t = (LocalTransactionId) txid; LocalTransactionId t = (LocalTransactionId) txid;
KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId(); KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId();
kahaTxId.setConnectionId(t.getConnectionId().getValue()); kahaTxId.setConnectionId(t.getConnectionId().getValue());
kahaTxId.setTransacitonId(t.getValue()); kahaTxId.setTransactionId(t.getValue());
rc.setLocalTransacitonId(kahaTxId); rc.setLocalTransactionId(kahaTxId);
} else { } else {
XATransactionId t = (XATransactionId) txid; XATransactionId t = (XATransactionId) txid;
KahaXATransactionId kahaTxId = new KahaXATransactionId(); KahaXATransactionId kahaTxId = new KahaXATransactionId();
kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier())); kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier()));
kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId())); kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
kahaTxId.setFormatId(t.getFormatId()); kahaTxId.setFormatId(t.getFormatId());
rc.setXaTransacitonId(kahaTxId); rc.setXaTransactionId(kahaTxId);
} }
return rc; return rc;
} }

View File

@ -90,7 +90,7 @@ public class MultiKahaDBPersistenceAdapter extends DestinationMap implements Per
kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId())); kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
kahaTxId.setFormatId(t.getFormatId()); kahaTxId.setFormatId(t.getFormatId());
} }
rc.setXaTransacitonId(kahaTxId); rc.setXaTransactionId(kahaTxId);
return rc; return rc;
} }
}; };

View File

@ -33,8 +33,8 @@ public class TransactionIdConversion {
LocalTransactionId t = (LocalTransactionId) tx; LocalTransactionId t = (LocalTransactionId) tx;
KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId(); KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId();
kahaTxId.setConnectionId(t.getConnectionId().getValue()); kahaTxId.setConnectionId(t.getConnectionId().getValue());
kahaTxId.setTransacitonId(t.getValue()); kahaTxId.setTransactionId(t.getValue());
rc.setLocalTransacitonId(kahaTxId); rc.setLocalTransactionId(kahaTxId);
return rc; return rc;
} }
@ -53,20 +53,20 @@ public class TransactionIdConversion {
kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier())); kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier()));
kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId())); kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId()));
kahaTxId.setFormatId(t.getFormatId()); kahaTxId.setFormatId(t.getFormatId());
rc.setXaTransacitonId(kahaTxId); rc.setXaTransactionId(kahaTxId);
} }
return rc; return rc;
} }
static TransactionId convert(KahaTransactionInfo transactionInfo) { static TransactionId convert(KahaTransactionInfo transactionInfo) {
if (transactionInfo.hasLocalTransacitonId()) { if (transactionInfo.hasLocalTransactionId()) {
KahaLocalTransactionId tx = transactionInfo.getLocalTransacitonId(); KahaLocalTransactionId tx = transactionInfo.getLocalTransactionId();
LocalTransactionId rc = new LocalTransactionId(); LocalTransactionId rc = new LocalTransactionId();
rc.setConnectionId(new ConnectionId(tx.getConnectionId())); rc.setConnectionId(new ConnectionId(tx.getConnectionId()));
rc.setValue(tx.getTransacitonId()); rc.setValue(tx.getTransactionId());
return rc; return rc;
} else { } else {
KahaXATransactionId tx = transactionInfo.getXaTransacitonId(); KahaXATransactionId tx = transactionInfo.getXaTransactionId();
XATransactionId rc = new XATransactionId(); XATransactionId rc = new XATransactionId();
rc.setBranchQualifier(tx.getBranchQualifier().toByteArray()); rc.setBranchQualifier(tx.getBranchQualifier().toByteArray());
rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray()); rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray());

View File

@ -137,14 +137,14 @@ message KahaDestination {
} }
message KahaTransactionInfo { message KahaTransactionInfo {
optional KahaLocalTransactionId local_transaciton_id=1; optional KahaLocalTransactionId local_transaction_id=1;
optional KahaXATransactionId xa_transaciton_id=2; optional KahaXATransactionId xa_transaction_id=2;
optional KahaLocation previous_entry=3; optional KahaLocation previous_entry=3;
} }
message KahaLocalTransactionId { message KahaLocalTransactionId {
required string connection_id=1; required string connection_id=1;
required int64 transaciton_id=1; required int64 transaction_id=1;
} }
message KahaXATransactionId { message KahaXATransactionId {