public Message[] getMessages() { Message rc[] = new Message[messages.size()]; int count = 0; for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) { AddMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessage(); } return rc; }
final Message message = iter.next().getMessage();
public Message[] getMessages() { Message rc[] = new Message[messages.size()]; int count = 0; for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) { AddMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessage(); } return rc; }
final Message message = iter.next().getMessage();
final Message message = iter.next().getMessage();
final Message message = iter.next().getMessage();
@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 CommitAddOutcome(AddMessageCommand addMessageCommand) { this((JDBCMessageStore)addMessageCommand.getMessageStore(), addMessageCommand.getMessage()); }
public CommitAddOutcome(AddMessageCommand addMessageCommand) { this((JDBCMessageStore)addMessageCommand.getMessageStore(), addMessageCommand.getMessage()); }
public CommitAddOutcome(AddMessageCommand addMessageCommand) { this((JDBCMessageStore)addMessageCommand.getMessageStore(), addMessageCommand.getMessage()); }
public Message[] getMessages() { Message rc[] = new Message[messages.size()]; int count = 0; for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) { AddMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessage(); } return rc; }
public Message[] getMessages() { Message rc[] = new Message[messages.size()]; int count = 0; for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) { AddMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessage(); } return rc; }
public Message[] getMessages() { Message rc[] = new Message[messages.size()]; int count = 0; for (Iterator<AddMessageCommand> iter = messages.iterator(); iter.hasNext();) { AddMessageCommand cmd = iter.next(); rc[count++] = cmd.getMessage(); } 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())); } }
public CommitAddOutcome(AddMessageCommand addMessageCommand) { this((JDBCMessageStore)addMessageCommand.getMessageStore(), addMessageCommand.getMessage()); }