本文整理了Java中org.apache.activemq.command.XATransactionId.<init>()
方法的一些代码示例,展示了XATransactionId.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XATransactionId.<init>()
方法的具体详情如下:
包路径:org.apache.activemq.command.XATransactionId
类名称:XATransactionId
方法名:<init>
暂无
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: apache/activemq
@Override
public TransactionId transform(TransactionId txid) {
if (txid == null) {
return null;
}
if (txid.isLocalTransaction()) {
final LocalTransactionId t = (LocalTransactionId) txid;
return new XATransactionId(new Xid() {
@Override
public int getFormatId() {
return LOCAL_FORMAT_ID_MAGIC;
}
@Override
public byte[] getGlobalTransactionId() {
return t.getConnectionId().getValue().getBytes(Charset.forName("utf-8"));
}
@Override
public byte[] getBranchQualifier() {
return Long.toString(t.getValue()).getBytes(Charset.forName("utf-8"));
}
});
} else {
return txid;
}
}
};
代码示例来源:origin: apache/activemq
@Override
public void forget(Xid xid) throws XAException {
LOG.debug("Forget: {}", xid);
// We allow interleaving multiple transactions, so
// we don't limit forget to the associated xid.
XATransactionId x;
if (xid == null) {
throw new XAException(XAException.XAER_PROTO);
}
if (equals(associatedXid, xid)) {
// TODO determine if this can happen... I think not.
x = (XATransactionId)transactionId;
} else {
x = new XATransactionId(xid);
}
TransactionInfo info = new TransactionInfo(getConnectionId(), x, TransactionInfo.FORGET);
try {
// Tell the server to forget the transaction.
this.connection.syncSendPacket(info);
} catch (JMSException e) {
throw toXAException(e);
}
synchronized(ENDED_XA_TRANSACTION_CONTEXTS) {
ENDED_XA_TRANSACTION_CONTEXTS.remove(x);
}
}
代码示例来源:origin: apache/activemq
} else {
x = new XATransactionId(xid);
代码示例来源:origin: apache/activemq
x = new XATransactionId(xid);
代码示例来源:origin: apache/activemq
x = new XATransactionId(xid);
代码示例来源:origin: apache/activemq
transactionId = new XATransactionId(xid);
代码示例来源:origin: apache/activemq
public void recoverLastAck(byte[] encodedXid, final ActiveMQDestination destination, final String subName, final String clientId) throws IOException {
Tx tx = getPreparedTx(new XATransactionId(encodedXid));
DataByteArrayInputStream inputStream = new DataByteArrayInputStream(encodedXid);
inputStream.skipBytes(1); // +|-
代码示例来源:origin: apache/activemq
public void recoverAck(long id, byte[] xid, byte[] message) throws IOException {
final Message msg = (Message) ((JDBCPersistenceAdapter)persistenceAdapter).getWireFormat().unmarshal(new ByteSequence(message));
msg.getMessageId().setFutureOrSequenceLong(id);
msg.getMessageId().setEntryLocator(id);
Tx tx = getPreparedTx(new XATransactionId(xid));
final MessageAck ack = new MessageAck(msg, MessageAck.STANDARD_ACK_TYPE, 1);
tx.add(new RecoveredRemoveMessageCommand() {
MessageStore messageStore = null;
@Override
public MessageAck getMessageAck() {
return ack;
}
@Override
public void run(ConnectionContext context) throws IOException {
((JDBCPersistenceAdapter)persistenceAdapter).commitRemove(context, ack);
}
public Message getMessage() {
return msg;
}
@Override
public void setMessageStore(MessageStore messageStore) {
this.messageStore = messageStore;
}
@Override
public MessageStore getMessageStore() {
return messageStore;
}
});
}
代码示例来源:origin: apache/activemq
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;
}
}
}
代码示例来源:origin: org.apache.activemq/activemq-client
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
代码示例来源:origin: org.apache.activemq/activemq-client
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new XATransactionId();
}
内容来源于网络,如有侵权,请联系作者删除!