public MessageAck[] getAcks() { MessageAck rc[] = new MessageAck[acks.size()]; int count = 0; for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) { RemoveMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessageAck(); } return rc; }
((LastAckCommand)removeMessageCommand).rollback(ctx); } else { MessageId messageId = removeMessageCommand.getMessageAck().getLastMessageId(); long sequence = (Long)messageId.getEntryLocator();
public MessageAck[] getAcks() { MessageAck rc[] = new MessageAck[acks.size()]; int count = 0; for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) { RemoveMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessageAck(); } return rc; }
((LastAckCommand)removeMessageCommand).rollback(ctx); } else { MessageId messageId = removeMessageCommand.getMessageAck().getLastMessageId();
((LastAckCommand)removeMessageCommand).rollback(ctx); } else { MessageId messageId = removeMessageCommand.getMessageAck().getLastMessageId();
((LastAckCommand)removeMessageCommand).rollback(ctx); } else { MessageId messageId = removeMessageCommand.getMessageAck().getLastMessageId();
@Override protected void onRecovered(Tx tx) { for (RemoveMessageCommand removeMessageCommand: tx.acks) { if (removeMessageCommand instanceof LastAckCommand) { LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand; JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) topicStores.get(lastAckCommand.getMessageAck().getDestination()); jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority()); lastAckCommand.setMessageStore(jdbcTopicMessageStore); } else { // when reading the store we ignore messages with non null XIDs but should include those with XIDS starting in - (pending acks in an xa transaction), // but the sql is non portable to match BLOB with LIKE etc // so we make up for it when we recover the ack ((JDBCPersistenceAdapter)persistenceAdapter).getBrokerService().getRegionBroker().getDestinationMap().get(removeMessageCommand.getMessageAck().getDestination()).getDestinationStatistics().getMessages().increment(); } } for (AddMessageCommand addMessageCommand : tx.messages) { ActiveMQDestination destination = addMessageCommand.getMessage().getDestination(); addMessageCommand.setMessageStore(destination.isQueue() ? queueStores.get(destination) : topicStores.get(destination)); } }
@Override protected void onRecovered(Tx tx) { for (RemoveMessageCommand removeMessageCommand: tx.acks) { if (removeMessageCommand instanceof LastAckCommand) { LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand; JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) topicStores.get(lastAckCommand.getMessageAck().getDestination()); jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority()); lastAckCommand.setMessageStore(jdbcTopicMessageStore); } else { // when reading the store we ignore messages with non null XIDs but should include those with XIDS starting in - (pending acks in an xa transaction), // but the sql is non portable to match BLOB with LIKE etc // so we make up for it when we recover the ack ((JDBCPersistenceAdapter)persistenceAdapter).getBrokerService().getRegionBroker().getDestinationMap().get(removeMessageCommand.getMessageAck().getDestination()).getDestinationStatistics().getMessages().increment(); } } for (AddMessageCommand addMessageCommand : tx.messages) { ActiveMQDestination destination = addMessageCommand.getMessage().getDestination(); addMessageCommand.setMessageStore(destination.isQueue() ? queueStores.get(destination) : topicStores.get(destination)); } }
@Override protected void onRecovered(Tx tx) { for (RemoveMessageCommand removeMessageCommand: tx.acks) { if (removeMessageCommand instanceof LastAckCommand) { LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand; JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) topicStores.get(lastAckCommand.getMessageAck().getDestination()); jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority()); lastAckCommand.setMessageStore(jdbcTopicMessageStore); } else { // when reading the store we ignore messages with non null XIDs but should include those with XIDS starting in - (pending acks in an xa transaction), // but the sql is non portable to match BLOB with LIKE etc // so we make up for it when we recover the ack ((JDBCPersistenceAdapter)persistenceAdapter).getBrokerService().getRegionBroker().getDestinationMap().get(removeMessageCommand.getMessageAck().getDestination()).getDestinationStatistics().getMessages().increment(); } } for (AddMessageCommand addMessageCommand : tx.messages) { ActiveMQDestination destination = addMessageCommand.getMessage().getDestination(); addMessageCommand.setMessageStore(destination.isQueue() ? queueStores.get(destination) : topicStores.get(destination)); } }
public MessageAck[] getAcks() { MessageAck rc[] = new MessageAck[acks.size()]; int count = 0; for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) { RemoveMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessageAck(); } return rc; }
public MessageAck[] getAcks() { MessageAck rc[] = new MessageAck[acks.size()]; int count = 0; for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) { RemoveMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessageAck(); } return rc; }
public MessageAck[] getAcks() { MessageAck rc[] = new MessageAck[acks.size()]; int count = 0; for (Iterator<RemoveMessageCommand> iter = acks.iterator(); iter.hasNext();) { RemoveMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessageAck(); } return rc; }
@Override protected void onRecovered(Tx tx) { for (RemoveMessageCommand removeMessageCommand: tx.acks) { if (removeMessageCommand instanceof LastAckCommand) { LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand; JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) findMessageStore(lastAckCommand.getMessageAck().getDestination()); jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority()); lastAckCommand.setMessageStore(jdbcTopicMessageStore); } else { ((RecoveredRemoveMessageCommand)removeMessageCommand).setMessageStore(findMessageStore(removeMessageCommand.getMessageAck().getDestination())); } } for (AddMessageCommand addMessageCommand : tx.messages) { addMessageCommand.setMessageStore(findMessageStore(addMessageCommand.getMessage().getDestination())); } }