@Override public void handleEvent(EventContext context) { AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context; transactionManager.receivedAcknowledgement(atm.getLocalSessionID(), atm.getRequestID(), atm.getSourceNodeID()); }
@Override public void handleEvent(EventContext context) { AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context; transactionManager.acknowledgement(atm.getRequesterID(), atm.getRequestID(), atm.getSourceNodeID()); }
void sendAck(final BroadcastTransactionMessage btm) { // XXX:: This is a potential race condition here 'coz after we decide to send an ACK // and before we actually send it, the server may go down and come back up ! if (this.sessionManager.isCurrentSession(btm.getSourceNodeID(), btm.getLocalSessionID())) { AcknowledgeTransactionMessage ack = this.atmFactory.newAcknowledgeTransactionMessage(btm.getSourceNodeID()); ack.initialize(btm.getCommitterID(), btm.getTransactionID()); ack.send(); } }
void sendAck(final BroadcastTransactionMessage btm) { // XXX:: This is a potential race condition here 'coz after we decide to send an ACK // and before we actually send it, the server may go down and come back up ! if (this.sessionManager.isCurrentSession(btm.getSourceNodeID(), btm.getLocalSessionID())) { AcknowledgeTransactionMessage ack = this.atmFactory.newAcknowledgeTransactionMessage(btm.getSourceNodeID()); ack.initialize(btm.getCommitterID(), btm.getTransactionID()); ack.send(); } }
@Override public void handleEvent(EventContext context) { AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context; transactionManager.receivedAcknowledgement(atm.getLocalSessionID(), atm.getRequestID(), atm.getSourceNodeID()); }
@Override public void acknowledgeTransaction(ServerTransactionID stxID) { try { NodeID nodeID = stxID.getSourceID(); MessageChannel channel = channelManager.getActiveChannel(nodeID); // send ack AcknowledgeTransactionMessage m = (AcknowledgeTransactionMessage) channel .createMessage(TCMessageType.ACKNOWLEDGE_TRANSACTION_MESSAGE); m.initialize(stxID.getSourceID(), stxID.getClientTransactionID()); m.send(); // send batch ack if necessary try { if (transactionBatchManager.batchComponentComplete(nodeID, stxID.getClientTransactionID())) { BatchTransactionAcknowledgeMessage msg = channelManager.newBatchTransactionAcknowledgeMessage(nodeID); // We always send null batch ID since its never used - clean up msg.initialize(TxnBatchID.NULL_BATCH_ID); msg.send(); } } catch (NoSuchBatchException e) { throw new AssertionError(e); } } catch (NoSuchChannelException e) { logger.info("An attempt was made to send a commit ack but the client seems to have gone away:" + stxID); return; } } }
@Override public void handleEvent(EventContext context) { AcknowledgeTransactionMessage atm = (AcknowledgeTransactionMessage) context; transactionManager.receivedAcknowledgement(atm.getLocalSessionID(), atm.getRequestID(), atm.getSourceNodeID()); }
ack.initialize(btm.getCommitterID(), btm.getTransactionID()); ack.send();